public final class SizeConstraint
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
SizeConstraint.SizeConstraintType
Constraint type.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<SizeConstraint> |
CREATOR |
Constructor and Description |
---|
SizeConstraint(SizeConstraint.SizeConstraintType sizeConstraintType,
float value)
Constructs a new
SizeConstraint configured with size type and value. |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
SizeConstraint.SizeConstraintType |
getSizeConstraintType()
Returns size constraint type.
|
float |
getValue()
Returns value of the SizeConstraint.
|
int |
hashCode() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<SizeConstraint> CREATOR
public SizeConstraint(SizeConstraint.SizeConstraintType sizeConstraintType, float value)
SizeConstraint
configured with size type and value.sizeConstraintType
- Constraint size type.value
- Constraint value. Value meaning differs depending on size type.
Fixed value in points for SizeConstraintType.FIXED, e.g. 140.
Ratio value for SizeConstraintType.FIXED_RATIO between 0 and 1,
e.g. 0.5 value means size of 100 points for 200 banner size.
Ratio value for SizeConstraintType.PREFERRED_RATIO between 0 and 1.SizeConstraint.SizeConstraintType
public float getValue()
public SizeConstraint.SizeConstraintType getSizeConstraintType()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable