|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.odftoolkit.odfdom.type.Length
public class Length
This class represents the in OpenDocument format used data type
| Nested Class Summary | |
|---|---|
static class |
Length.Unit
Measurement units for ODF datatype length |
| Constructor Summary | |
|---|---|
Length(java.lang.String length)
Construct Length by the parsing the given string |
|
| Method Summary | |
|---|---|
static boolean |
isValid(java.lang.String stringValue)
Check if the specified String instance is a valid data type |
java.lang.String |
mapToUnit(Length.Unit destinationUnit)
|
static java.lang.String |
mapToUnit(java.lang.String length,
Length.Unit destinationUnit)
Maps the a length string to a different unit |
static double |
parseDouble(java.lang.String length)
Returns the value of the given length as double. |
static double |
parseDouble(java.lang.String length,
Length.Unit destinationUnit)
Maps the a length string to a different unit |
static int |
parseInt(java.lang.String length)
Returns the value of the given length as int. |
static int |
parseInt(java.lang.String length,
Length.Unit destinationUnit)
Returns the value of the given length as int. |
static long |
parseLong(java.lang.String length)
Returns the value of the given length as long. |
static long |
parseLong(java.lang.String length,
Length.Unit destinationUnit)
Maps the a length string to a different unit |
static Length.Unit |
parseUnit(java.lang.String length)
Returns the Unit of the given length. |
java.lang.String |
toString()
Returns a String Object representing this Length's value |
static Length |
valueOf(java.lang.String stringValue)
Returns a Length instance representing the specified String value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Length(java.lang.String length)
throws java.lang.NumberFormatException
length - The String to be parsed into Length
java.lang.NumberFormatException - if the given argument is not a valid Length| Method Detail |
|---|
public static boolean isValid(java.lang.String stringValue)
stringValue - the value to be tested
public static Length.Unit parseUnit(java.lang.String length)
length - the Unit should be obtained from
Unit object representing the specified Length unit.public static int parseInt(java.lang.String length)
length - the int value should be obtained from
int value representing the specified Length value.
public static int parseInt(java.lang.String length,
Length.Unit destinationUnit)
length - the int value should be obtained fromdestinationUnit - The unit to be converted to
int value representing the specified Length value.public static long parseLong(java.lang.String length)
length - the long value should be obtained from
long value representing the specified Length value.
public static long parseLong(java.lang.String length,
Length.Unit destinationUnit)
length - The value to be mappeddestinationUnit - The unit to be converted to
public static double parseDouble(java.lang.String length)
length - the double value should be obtained from
double value representing the specified Length value.
public static double parseDouble(java.lang.String length,
Length.Unit destinationUnit)
length - The value to be mappeddestinationUnit - The unit to be converted to
public java.lang.String mapToUnit(Length.Unit destinationUnit)
destinationUnit - The unit to be converted to
public static java.lang.String mapToUnit(java.lang.String length,
Length.Unit destinationUnit)
length - The value to be mappeddestinationUnit - The unit to be converted to
public static Length valueOf(java.lang.String stringValue)
throws java.lang.NumberFormatException
stringValue - a String value
java.lang.NumberFormatException - if the given argument is not a valid Lengthpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||