Package wtf.choco.arrows.api.property
Class SimpleArrowProperty
java.lang.Object
wtf.choco.arrows.api.property.SimpleArrowProperty
- All Implemented Interfaces:
ArrowPropertyValue
- Direct Known Subclasses:
DynamicArrowPropertyValue
public class SimpleArrowProperty extends Object implements ArrowPropertyValue
Represents an
ArrowPropertyValue
with a fixed value.- Author:
- Parker Hawke - Choco
-
Constructor Summary
Constructors Constructor Description SimpleArrowProperty(Object value)
Construct a new arrow property with the given value. -
Method Summary
Modifier and Type Method Description boolean
getAsBoolean()
Get this value as a primitive boolean.byte
getAsByte()
Get this value as a primitive byte.double
getAsDouble()
Get this value as a primitive double.float
getAsFloat()
Get this value as a primitive float.int
getAsInt()
Get this value as a primitive int.long
getAsLong()
Get this value as a primitive long.short
getAsShort()
Get this value as a primitive short.String
getAsString()
Get this value as a String.Object
getValue()
Get this value.
-
Constructor Details
-
SimpleArrowProperty
Construct a new arrow property with the given value.- Parameters:
value
- the value
-
-
Method Details
-
getAsInt
public int getAsInt()Description copied from interface:ArrowPropertyValue
Get this value as a primitive int.- Specified by:
getAsInt
in interfaceArrowPropertyValue
- Returns:
- an int
-
getAsFloat
public float getAsFloat()Description copied from interface:ArrowPropertyValue
Get this value as a primitive float.- Specified by:
getAsFloat
in interfaceArrowPropertyValue
- Returns:
- a float
-
getAsDouble
public double getAsDouble()Description copied from interface:ArrowPropertyValue
Get this value as a primitive double.- Specified by:
getAsDouble
in interfaceArrowPropertyValue
- Returns:
- a double
-
getAsLong
public long getAsLong()Description copied from interface:ArrowPropertyValue
Get this value as a primitive long.- Specified by:
getAsLong
in interfaceArrowPropertyValue
- Returns:
- a long
-
getAsShort
public short getAsShort()Description copied from interface:ArrowPropertyValue
Get this value as a primitive short.- Specified by:
getAsShort
in interfaceArrowPropertyValue
- Returns:
- a short
-
getAsByte
public byte getAsByte()Description copied from interface:ArrowPropertyValue
Get this value as a primitive byte.- Specified by:
getAsByte
in interfaceArrowPropertyValue
- Returns:
- a byte
-
getAsBoolean
public boolean getAsBoolean()Description copied from interface:ArrowPropertyValue
Get this value as a primitive boolean.- Specified by:
getAsBoolean
in interfaceArrowPropertyValue
- Returns:
- a boolean
-
getAsString
Description copied from interface:ArrowPropertyValue
Get this value as a String.- Specified by:
getAsString
in interfaceArrowPropertyValue
- Returns:
- a string
-
getValue
Description copied from interface:ArrowPropertyValue
Get this value.- Specified by:
getValue
in interfaceArrowPropertyValue
- Returns:
- the value
-