|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.SizeWithUnit
public class SizeWithUnit
A class for representing a value-unit pair. Also contains utility methods for parsing such pairs from a string.
| Constructor Summary | |
|---|---|
SizeWithUnit(float size,
Sizeable.Unit unit)
Constructs a new SizeWithUnit object representing the pair (size, unit). |
|
| Method Summary | |
|---|---|
float |
getSize()
Returns the numeric value stored in this object. |
Sizeable.Unit |
getUnit()
Returns the unit stored in this object. |
static SizeWithUnit |
parseStringSize(java.lang.String s)
Returns an object whose numeric value and unit are taken from the string s. |
static SizeWithUnit |
parseStringSize(java.lang.String s,
Sizeable.Unit defaultUnit)
Returns an object whose numeric value and unit are taken from the string s. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SizeWithUnit(float size,
Sizeable.Unit unit)
size - a numeric valueunit - a unit| Method Detail |
|---|
public float getSize()
public Sizeable.Unit getUnit()
public static SizeWithUnit parseStringSize(java.lang.String s,
Sizeable.Unit defaultUnit)
s - the string to be parseddefaultUnit - The unit to be used if s does not contain any unit. Use null
for no default unit.
public static SizeWithUnit parseStringSize(java.lang.String s)
s - the string to be parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||