|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.core.value.EnumeratedPropertyValueRange<T>
T
- the type of the enumeration.
public final class EnumeratedPropertyValueRange<T extends Enum<T>>
A property value range backed up by an enumeration of values.
Constructor Summary | |
---|---|
EnumeratedPropertyValueRange(Class<T> enumeration) Default constructor. |
Method Summary | |
---|---|
boolean |
equals(Object object) |
T |
fromString(String valueAsString) Constructs a value of the real type T from the given string representation of a value of the range. |
Class<T> |
getEnumeration() Returns the enumeration to provide the value for this range. |
List<T> |
getValues() Returns the list of values provided by the property range. |
int |
hashCode() |
boolean |
isCommented() Checks whether or not the values have comments. |
String |
toString() Returns the list of possible values or any form to show the the range of values to select from using the default locale. |
String |
toString(Locale locale) Returns the list of possible values or any form to show the the range of values to select from. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EnumeratedPropertyValueRange(Class<T> enumeration) throws de.smartics.util.lang.NullArgumentException
enumeration
- the enumeration to provide the value for this range.
de.smartics.util.lang.NullArgumentException
- of {code enumeration} is
null
.
Method Detail |
---|
public Class<T> getEnumeration()
public List<T> getValues()
PropertyValueRange
PropertyValueRange.toString()
returns information about the values that should be rendered instead.
Example:
For instance, if the range is restricted to prime numbers, this method returns the empty list and the <A HREF="../../../../../../de/smartics/properties/api/core/domain/PropertyValueRange.html#toString()"><CODE>PropertyValueRange.toString()</CODE></A> method returns the descriptive text "Only prime numbers are allowed as values for this property.".
getValues
in interface
PropertyValueRange<T extends Enum<T>>
public T fromString(String valueAsString) throws IllegalArgumentException
PropertyValueRange
T
from the given string representation of a value of the range.
fromString
in interface
PropertyValueRange<T extends Enum<T>>
valueAsString
- the string representation of the value.
T
.
IllegalArgumentException
- if the given string argument cannot be parsed and is therefore illegal to construct an instance of type
<T>
.
public boolean isCommented()
PropertyValueRange
isCommented
in interface
PropertyValueRange<T extends Enum<T>>
true
if the values have comments,
false
if the values have no comments.
public int hashCode()
hashCode
in class
Object
public boolean equals(Object object)
equals
in class
Object
public String toString(Locale locale)
PropertyValueRange
toString
in interface
PropertyValueRange<T extends Enum<T>>
locale
- the locale to use for formatting.
public String toString()
PropertyValueRange
toString
in interface
PropertyValueRange<T extends Enum<T>>
toString
in class
Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |