Merge "Add @SafeVarargs for methods using typevar varargs." into nyc-dev
am: 7f1bdd9
* commit '7f1bdd9f9180574c8b6b98cefe3c542b92477295':
Add @SafeVarargs for methods using typevar varargs.
This commit is contained in:
@@ -373,6 +373,7 @@ public final class ObjectAnimator extends ValueAnimator {
|
|||||||
* @param values A set of values that the animation will animate between over time.
|
* @param values A set of values that the animation will animate between over time.
|
||||||
* @return An ObjectAnimator object that is set up to animate between the given values.
|
* @return An ObjectAnimator object that is set up to animate between the given values.
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> ObjectAnimator ofMultiInt(Object target, String propertyName,
|
public static <T> ObjectAnimator ofMultiInt(Object target, String propertyName,
|
||||||
TypeConverter<T, int[]> converter, TypeEvaluator<T> evaluator, T... values) {
|
TypeConverter<T, int[]> converter, TypeEvaluator<T> evaluator, T... values) {
|
||||||
PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiInt(propertyName, converter,
|
PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiInt(propertyName, converter,
|
||||||
@@ -569,6 +570,7 @@ public final class ObjectAnimator extends ValueAnimator {
|
|||||||
* @param values A set of values that the animation will animate between over time.
|
* @param values A set of values that the animation will animate between over time.
|
||||||
* @return An ObjectAnimator object that is set up to animate between the given values.
|
* @return An ObjectAnimator object that is set up to animate between the given values.
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T> ObjectAnimator ofMultiFloat(Object target, String propertyName,
|
public static <T> ObjectAnimator ofMultiFloat(Object target, String propertyName,
|
||||||
TypeConverter<T, float[]> converter, TypeEvaluator<T> evaluator, T... values) {
|
TypeConverter<T, float[]> converter, TypeEvaluator<T> evaluator, T... values) {
|
||||||
PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiFloat(propertyName, converter,
|
PropertyValuesHolder pvh = PropertyValuesHolder.ofMultiFloat(propertyName, converter,
|
||||||
@@ -642,6 +644,7 @@ public final class ObjectAnimator extends ValueAnimator {
|
|||||||
* @return An ObjectAnimator object that is set up to animate between the given values.
|
* @return An ObjectAnimator object that is set up to animate between the given values.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@SafeVarargs
|
||||||
public static <T, V> ObjectAnimator ofObject(T target, Property<T, V> property,
|
public static <T, V> ObjectAnimator ofObject(T target, Property<T, V> property,
|
||||||
TypeEvaluator<V> evaluator, V... values) {
|
TypeEvaluator<V> evaluator, V... values) {
|
||||||
ObjectAnimator anim = new ObjectAnimator(target, property);
|
ObjectAnimator anim = new ObjectAnimator(target, property);
|
||||||
@@ -670,6 +673,7 @@ public final class ObjectAnimator extends ValueAnimator {
|
|||||||
* @return An ObjectAnimator object that is set up to animate between the given values.
|
* @return An ObjectAnimator object that is set up to animate between the given values.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@SafeVarargs
|
||||||
public static <T, V, P> ObjectAnimator ofObject(T target, Property<T, P> property,
|
public static <T, V, P> ObjectAnimator ofObject(T target, Property<T, P> property,
|
||||||
TypeConverter<V, P> converter, TypeEvaluator<V> evaluator, V... values) {
|
TypeConverter<V, P> converter, TypeEvaluator<V> evaluator, V... values) {
|
||||||
PropertyValuesHolder pvh = PropertyValuesHolder.ofObject(property, converter, evaluator,
|
PropertyValuesHolder pvh = PropertyValuesHolder.ofObject(property, converter, evaluator,
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ public class PropertyValuesHolder implements Cloneable {
|
|||||||
* @see ObjectAnimator#ofMultiInt(Object, String, TypeConverter, TypeEvaluator, Object[])
|
* @see ObjectAnimator#ofMultiInt(Object, String, TypeConverter, TypeEvaluator, Object[])
|
||||||
* @see ObjectAnimator#ofPropertyValuesHolder(Object, PropertyValuesHolder...)
|
* @see ObjectAnimator#ofPropertyValuesHolder(Object, PropertyValuesHolder...)
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <V> PropertyValuesHolder ofMultiInt(String propertyName,
|
public static <V> PropertyValuesHolder ofMultiInt(String propertyName,
|
||||||
TypeConverter<V, int[]> converter, TypeEvaluator<V> evaluator, V... values) {
|
TypeConverter<V, int[]> converter, TypeEvaluator<V> evaluator, V... values) {
|
||||||
return new MultiIntValuesHolder(propertyName, converter, evaluator, values);
|
return new MultiIntValuesHolder(propertyName, converter, evaluator, values);
|
||||||
@@ -353,6 +354,7 @@ public class PropertyValuesHolder implements Cloneable {
|
|||||||
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
|
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
|
||||||
* @see ObjectAnimator#ofMultiFloat(Object, String, TypeConverter, TypeEvaluator, Object[])
|
* @see ObjectAnimator#ofMultiFloat(Object, String, TypeConverter, TypeEvaluator, Object[])
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <V> PropertyValuesHolder ofMultiFloat(String propertyName,
|
public static <V> PropertyValuesHolder ofMultiFloat(String propertyName,
|
||||||
TypeConverter<V, float[]> converter, TypeEvaluator<V> evaluator, V... values) {
|
TypeConverter<V, float[]> converter, TypeEvaluator<V> evaluator, V... values) {
|
||||||
return new MultiFloatValuesHolder(propertyName, converter, evaluator, values);
|
return new MultiFloatValuesHolder(propertyName, converter, evaluator, values);
|
||||||
@@ -438,6 +440,7 @@ public class PropertyValuesHolder implements Cloneable {
|
|||||||
* @param values The values that the property will animate between.
|
* @param values The values that the property will animate between.
|
||||||
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
|
* @return PropertyValuesHolder The constructed PropertyValuesHolder object.
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <V> PropertyValuesHolder ofObject(Property property,
|
public static <V> PropertyValuesHolder ofObject(Property property,
|
||||||
TypeEvaluator<V> evaluator, V... values) {
|
TypeEvaluator<V> evaluator, V... values) {
|
||||||
PropertyValuesHolder pvh = new PropertyValuesHolder(property);
|
PropertyValuesHolder pvh = new PropertyValuesHolder(property);
|
||||||
@@ -465,6 +468,7 @@ public class PropertyValuesHolder implements Cloneable {
|
|||||||
* @see #setConverter(TypeConverter)
|
* @see #setConverter(TypeConverter)
|
||||||
* @see TypeConverter
|
* @see TypeConverter
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static <T, V> PropertyValuesHolder ofObject(Property<?, V> property,
|
public static <T, V> PropertyValuesHolder ofObject(Property<?, V> property,
|
||||||
TypeConverter<T, V> converter, TypeEvaluator<T> evaluator, T... values) {
|
TypeConverter<T, V> converter, TypeEvaluator<T> evaluator, T... values) {
|
||||||
PropertyValuesHolder pvh = new PropertyValuesHolder(property);
|
PropertyValuesHolder pvh = new PropertyValuesHolder(property);
|
||||||
|
|||||||
@@ -621,6 +621,7 @@ public class ActivityOptions {
|
|||||||
* @see android.transition.Transition#setEpicenterCallback(
|
* @see android.transition.Transition#setEpicenterCallback(
|
||||||
* android.transition.Transition.EpicenterCallback)
|
* android.transition.Transition.EpicenterCallback)
|
||||||
*/
|
*/
|
||||||
|
@SafeVarargs
|
||||||
public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
|
public static ActivityOptions makeSceneTransitionAnimation(Activity activity,
|
||||||
Pair<View, String>... sharedElements) {
|
Pair<View, String>... sharedElements) {
|
||||||
ActivityOptions opts = new ActivityOptions();
|
ActivityOptions opts = new ActivityOptions();
|
||||||
|
|||||||
Reference in New Issue
Block a user