Class ConstantSize
java.lang.Object
com.vaadin.featurepack.desktop.layouts.form.ConstantSize
- All Implemented Interfaces:
Size,Serializable
A
Size implementation that represents constant sizes described by a
value and unit.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstantSize(double value, Unit unit) Constructs a ConstantSize for the given size and unit.ConstantSize(int value, Unit unit) Constructs a ConstantSize for the given size and unit. -
Method Summary
Modifier and TypeMethodDescriptionencode()Returns a parseable string representation of this constant size.booleanIndicates whether some other ConstantSize is "equal to" this one.getUnit()Returns this size's unit.doublegetValue()Returns this size's value.inthashCode()Returns a hash code value for the object.toString()Returns a string representation of this size object.
-
Constructor Details
-
ConstantSize
Constructs a ConstantSize for the given size and unit.- Parameters:
value- the size value interpreted in the given unitsunit- the size's unit
-
ConstantSize
Constructs a ConstantSize for the given size and unit.- Parameters:
value- the size value interpreted in the given unitsunit- the size's unit
-
-
Method Details
-
getValue
public double getValue()Returns this size's value.- Returns:
- the size value
-
getUnit
Returns this size's unit.- Returns:
- the size unit
-
equals
Indicates whether some other ConstantSize is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable. -
toString
Returns a string representation of this size object. Note: This string representation may change at any time. It is intended for debugging purposes. For parsing, useencode()instead. -
encode
Returns a parseable string representation of this constant size.
-