/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.support.animation; import android.annotation.TargetApi; import android.util.FloatProperty; /** *
FloatPropertyCompat is an abstraction that can be used to represent a mutable float value that
* is held in a host object. To access this float value, {@link #setValue(Object, float)} and getter
* {@link #getValue(Object)} need to be implemented. Both the setter and the getter take the
* primitive float
type and avoids autoboxing and other overhead associated with the
* Float
class.
*
*
For API 24 and later, {@link FloatProperty} instances can be converted to
* {@link FloatPropertyCompat} through
* {@link FloatPropertyCompat#createFloatPropertyCompat(FloatProperty)}.
*
* @param object
.
*
* @param object object which this property represents
* @return the current property value of the given object
*/
public abstract float getValue(T object);
/**
* Sets the value on object
which this property represents.
*
* @param object object which this property represents
* @param value new value of the property
*/
public abstract void setValue(T object, float value);
}