I hereby claim:
- I am pablisco on github.
- I am pablisco (https://keybase.io/pablisco) on keybase.
- I have a public key whose fingerprint is E135 E879 2702 D75D 32BD A39A 048F 1643 E876 2E4C
To claim this, I am signing this object:
public final class Result<S, F> { | |
private final Optional<S> success; | |
private final Optional<F> failure; | |
public Result(Optional<S> success, Optional<F> failure) { | |
this.success = success; | |
this.failure = failure; | |
} |
I hereby claim:
To claim this, I am signing this object:
public class ObjectMatcher<T> { | |
private SparseArrayCompat<T> values = new SparseArrayCompat<>(); | |
public MatchCandidate matchWith(T value) { | |
return new MatchCandidate(value); | |
} | |
public T find(Object... keys) { | |
return values.get(Arrays.hashCode(keys)); |
#set($paramName = $helper.getParamName($field, $project)) | |
public ## | |
#if($field.modifierStatic) | |
static void ## | |
#else | |
$classname ## | |
#end | |
with$StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))($field.type $paramName) { | |
#if ($field.name == $paramName) | |
#if (!$field.modifierStatic) |
// on global layout | |
@Rule | |
public final ActivityTestRule<AwesomeActivity> activityTestRule = new ActivityTestRule<CartActivity>(AwesomeActivity.class, true, false) { | |
@Override | |
protected void afterActivityLaunched() { | |
hideProgressBarAnimation(getActivity()); | |
} | |
}; |
fun ImageView.startLoadingAnimation( | |
@ColorRes startColorRes: Int, | |
@ColorRes endColorRes: Int | |
) { | |
animate( | |
ArgbEvaluator(), | |
colors[startColorRes], | |
colors[endColorRes], | |
onConfig = { | |
duration = 1000 |
import android.content.Context | |
import android.content.res.Resources | |
import android.graphics.drawable.Drawable | |
import android.support.annotation.AnyRes | |
import android.support.v4.app.Fragment | |
import android.support.v4.content.res.ResourcesCompat.* | |
import android.view.View | |
val Context.animations | |
get() = ResourceMapper { resources.getAnimation(it) } |
import java.io.Serializable | |
import java.lang.reflect.* | |
import java.lang.reflect.Array as ArrayType | |
import java.util.* | |
val EMPTY_TYPE_ARRAY: kotlin.Array<Type> = emptyArray() | |
/** | |
* Returns a new parameterized type, applying {@code typeArguments} to | |
* {@code rawType} and enclosed by {@code ownerType}. |
import android.app.Activity | |
import android.app.Service | |
import android.content.ComponentName | |
import android.content.Context | |
import android.content.Intent | |
import android.content.Intent.EXTRA_SUBJECT | |
import android.content.Intent.EXTRA_TEXT | |
import android.net.Uri | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KClass |
import android.os.Build | |
import android.view.View | |
import java.util.concurrent.atomic.AtomicInteger | |
object ViewCompanion { | |
private val NEXT_GENERATED_ID = AtomicInteger(1) | |
/** | |
* Inspired by: https://stackoverflow.com/a/15442997/458365 |