|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.Property
public class Property
This class defines an arbitrary property of an object. It specifies the property name, the type of property (numeric, text, boolean, etc.), and the set of allowed values.
Nested Class Summary | |
---|---|
static class |
Property.PropertyType
Instances of this class represent specific types of properties. |
Field Summary | |
---|---|
static Property.PropertyType |
BOOLEAN
A property whose values are represented by Boolean objects. |
static Property.PropertyType |
COLOR
A property whose values are represented by RGBColor objects. |
static Property.PropertyType |
DOUBLE
A property whose values are represented by Double objects. |
static Property.PropertyType |
ENUMERATION
A property whose values must be one of a fixed set of allowed values. |
static Property.PropertyType |
INTEGER
A property whose values are represented by Integer objects. |
static Property.PropertyType |
STRING
A property whose values are represented by String objects. |
Constructor Summary | |
---|---|
Property(java.lang.String name,
boolean defaultValue)
Create a Boolean valued property. |
|
Property(java.lang.String name,
double min,
double max,
double defaultValue)
Create a Double valued property. |
|
Property(java.lang.String name,
int min,
int max,
int defaultValue)
Create an Integer valued property. |
|
Property(java.lang.String name,
java.lang.Object[] allowedValues,
java.lang.Object defaultValue)
Create an enumerated property. |
|
Property(java.lang.String name,
RGBColor defaultValue)
Create an RGBColor valued property. |
|
Property(java.lang.String name,
java.lang.String defaultValue)
Create a String valued property. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Object[] |
getAllowedValues()
Get the list of allowed values. |
java.lang.Object |
getDefaultValue()
Get the default value for this property. |
double |
getMaximum()
Get the maximum allowed value. |
double |
getMinimum()
Get the minimum allowed value. |
java.lang.String |
getName()
Get the name of this property. |
Property.PropertyType |
getType()
Get the type of this property. |
int |
hashCode()
|
boolean |
isLegalValue(java.lang.Object value)
Determine whether an object represents a legal value for this property. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Property.PropertyType DOUBLE
public static final Property.PropertyType INTEGER
public static final Property.PropertyType BOOLEAN
public static final Property.PropertyType STRING
public static final Property.PropertyType COLOR
public static final Property.PropertyType ENUMERATION
Constructor Detail |
---|
public Property(java.lang.String name, double min, double max, double defaultValue)
public Property(java.lang.String name, int min, int max, int defaultValue)
public Property(java.lang.String name, boolean defaultValue)
public Property(java.lang.String name, java.lang.String defaultValue)
public Property(java.lang.String name, RGBColor defaultValue)
public Property(java.lang.String name, java.lang.Object[] allowedValues, java.lang.Object defaultValue)
Method Detail |
---|
public java.lang.String getName()
public Property.PropertyType getType()
public java.lang.Object getDefaultValue()
public double getMinimum()
public double getMaximum()
public java.lang.Object[] getAllowedValues()
public boolean isLegalValue(java.lang.Object value)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |