public class Length
extends java.lang.Object
Constructor and Description |
---|
Length()
Initializes a new instance of the Length class.
|
Length(float absoluteValue)
Initializes a new instance of the Length class.
|
Length(float value,
int type)
Initializes a new instance of the Length class.
|
Modifier and Type | Method and Description |
---|---|
int |
getType()
Gets how the length value is interpreted.
|
float |
getValue()
Gets the length value.
|
void |
setType(int value)
Sets how the length value is interpreted.
|
void |
setValue(float value)
Sets the length value.
|
java.lang.String |
toString()
Object.toString override.
|
public Length()
public Length(float absoluteValue)
absoluteValue
- A value representing the size or distance expressed as absolute quantity.public Length(float value, int type)
value
- The value of the newly created Length object.type
- A member of the LengthType enumeration.public java.lang.String toString()
toString
in class java.lang.Object
public void setValue(float value)
value
- A floating point value representing the length.public float getValue()
public void setType(int value)
value
- A member of the LengthType
enumeration.public int getType()
LengthType
enumeration.