Package org.odftoolkit.odfdom.type
Class NonNegativeLength
- java.lang.Object
-
- org.odftoolkit.odfdom.type.Length
-
- org.odftoolkit.odfdom.type.NonNegativeLength
-
- All Implemented Interfaces:
OdfDataType
public class NonNegativeLength extends Length
This class represents the in OpenDocument format used data type nonNegativeLength
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.odftoolkit.odfdom.type.Length
Length.Unit
-
-
Constructor Summary
Constructors Constructor Description NonNegativeLength(String length)
Construct NonNegativeLength by the parsing the given string
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValid(String stringValue)
check if the specified String instance is a valid nonNegativeLength data typestatic NonNegativeLength
valueOf(String stringValue)
Returns a NonNegativeLength instance representing the specified String value-
Methods inherited from class org.odftoolkit.odfdom.type.Length
getCentimeter, getInch, getLength, getMicrometer, getMillimeters, getPica, getPixel, getPoint, mapToUnit, mapToUnit, parseDouble, parseDouble, parseInt, parseInt, parseLong, parseLong, parseUnit, toString
-
-
-
-
Constructor Detail
-
NonNegativeLength
public NonNegativeLength(String length) throws NumberFormatException
Construct NonNegativeLength by the parsing the given string- Parameters:
length
- The String to be parsed into NonNegativeLength- Throws:
NumberFormatException
- if the given argument is not a valid NonNegativeLength
-
-
Method Detail
-
valueOf
public static NonNegativeLength valueOf(String stringValue) throws NumberFormatException
Returns a NonNegativeLength instance representing the specified String value- Parameters:
stringValue
- a String value- Returns:
- return a NonNegativeLength instance representing stringValue
- Throws:
NumberFormatException
- if the given argument is not a valid NonNegativeLength
-
isValid
public static boolean isValid(String stringValue)
check if the specified String instance is a valid nonNegativeLength data type- Parameters:
stringValue
- the value to be tested- Returns:
- true if the value of argument is valid for nonNegativeLength data type false otherwise
-
-