de.infinityloop.upcast.upl.val
Class UPLColor
java.lang.Object
de.infinityloop.upcast.upl.val.UPLValue
de.infinityloop.upcast.upl.val.UPLColor
public class UPLColor
- extends UPLValue
| Fields inherited from class de.infinityloop.upcast.upl.val.UPLValue |
isBreakValue, isEmptyReturnValue, isReturnValue, isValid, kTYPE_BOOL, kTYPE_COLOR, kTYPE_ID, kTYPE_LIST, kTYPE_NULL, kTYPE_NUMERIC, kTYPE_STRING, kTYPE_UNKNOWN, kTYPE_VALUE, kTYPE_VOID, type |
|
Constructor Summary |
UPLColor(int red,
int green,
int blue)
|
UPLColor(java.lang.String in)
|
| Methods inherited from class de.infinityloop.upcast.upl.val.UPLValue |
add, affirmate, castValueToType, decrement, div, equals, eval, getType, getType, getTypeName, getTypeName, increment, isBreakValue, isEmptyReturnValue, isReturnValue, isValid, mod, negate, not, setBreakValue, setEmptyReturnValue, setReturnValue, setValid, sub, times, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UPLColor
public UPLColor(java.lang.String in)
UPLColor
public UPLColor(int red,
int green,
int blue)
castToColor
public static UPLColor castToColor(UPLValue from)
throws UPLValueException
- Cretes a new Color object from the given Value.
- Parameters:
from - the Value the Color is created from.
- Returns:
- a new Color object.
- Throws:
UPLValueException
compareTo
public int compareTo(int compareType,
UPLValue to)
throws UPLValueException
- Specified by:
compareTo in class UPLValue
- Throws:
UPLValueException
getBooleanValue
public boolean getBooleanValue()
- Description copied from class:
UPLValue
- The boolean value of an UPLValue.
- Specified by:
getBooleanValue in class UPLValue
- Returns:
- always true
- See Also:
UPLValue.getBooleanValue()
getAsUPL
public java.lang.String getAsUPL()
- Returns a string representation of this Color.
- Specified by:
getAsUPL in class UPLValue
- Returns:
- a string representation of this Color
getAsString
public java.lang.String getAsString()
- Specified by:
getAsString in class UPLValue
getDebugString
public java.lang.String getDebugString()
- Specified by:
getDebugString in class UPLValue
getBlue
public int getBlue()
getGreen
public int getGreen()
getRed
public int getRed()
getAlpha
public double getAlpha()
isOk
public boolean isOk()