public class UPLColor extends UPLValue
isBreakValue, isContinueValue, isEmptyReturnValue, isReturnValue, isValid, kTYPE_BOOL, kTYPE_COLOR, kTYPE_ID, kTYPE_LAMBDA, kTYPE_LIST, kTYPE_NULL, kTYPE_NUMERIC, kTYPE_PRG, kTYPE_STRING, kTYPE_UNKNOWN, kTYPE_VALUE, kTYPE_VOID, type
Constructor and Description |
---|
UPLColor() |
UPLColor(int red,
int green,
int blue) |
UPLColor(int red,
int green,
int blue,
double alpha) |
UPLColor(java.lang.String in) |
Modifier and Type | Method and Description |
---|---|
UPLValue |
castAs(int toType,
de.infinityloop.upcast.util.namespace.NamespaceManager namespaceManager) |
static UPLColor |
castToColor(UPLValue from)
Cretes a new Color object from the given Value.
|
int |
compareTo(int compareType,
UPLValue to)
Compares this object with the specified object for order.
|
UPLColor |
deepCopy()
Creates a deep copy of a UPLValue.
|
double |
getAlpha() |
java.lang.String |
getAsString() |
java.lang.String |
getAsUPL()
Returns a string representation of this Color.
|
int |
getBlue() |
java.lang.String |
getDebugString() |
boolean |
getEffectiveBooleanValue()
The effective boolean value as per the XPath spec.
|
int |
getGreen() |
int |
getRed() |
boolean |
isOk() |
add, affirmate, castableAs, castValueToType, coerceToType, decrement, div, equals, eval, getInstanceofDistance, getType, getType, getTypeName, getTypeName, increment, isBreakValue, isContinueValue, isEmptyReturnValue, isReturnValue, isValid, matchRating, mod, negate, not, setBreakValue, setContinueValue, setEmptyReturnValue, setReturnValue, setValid, sub, times, toString
public UPLColor(java.lang.String in)
public UPLColor(int red, int green, int blue)
public UPLColor()
public UPLColor(int red, int green, int blue, double alpha)
public static UPLColor castToColor(UPLValue from) throws UPLValueException
from
- the Value the Color is created from.UPLValueException
public UPLValue castAs(int toType, de.infinityloop.upcast.util.namespace.NamespaceManager namespaceManager) throws UPLValueException
castAs
in class UPLValue
UPLValueException
public int compareTo(int compareType, UPLValue to) throws UPLValueException
UPLValue
compareTo
in class UPLValue
compareType
- see RelationalExpr: kEQ, kNEQ, kLT, kGT, kLTEQ, kGTEQto
- the Object to be comparedUPLValueException
public boolean getEffectiveBooleanValue()
getEffectiveBooleanValue
in class UPLValue
UPLValue.getEffectiveBooleanValue()
public java.lang.String getAsUPL()
public java.lang.String getAsString()
getAsString
in class UPLValue
public java.lang.String getDebugString()
getDebugString
in class UPLValue
public int getBlue()
public int getGreen()
public int getRed()
public double getAlpha()
public boolean isOk()
public UPLColor deepCopy() throws UPLValueException
UPLValue
deepCopy
in class UPLValue
UPLValueException