|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.nds.dirxml.engine.gcv.GCEnumValue.EnumChoice
Class representing a single enum choice.
Constructor Summary | |
GCEnumValue.EnumChoice(String value,
String displayName)
Construct an EnumChoice instance. |
|
GCEnumValue.EnumChoice(String value,
String displayName,
String displayNameRef)
Construct an EnumChoice instance. |
Method Summary | |
int |
compareTo(Object o)
Implementation of Comparable interface.
|
boolean |
equals(Object o)
Return true if the passed Object is an EnumChoice instance
and this instance's value matches the passed instance's value. |
String |
getDisplayName()
Return the display name String for this instance. |
String |
getDisplayNameRef()
Return the display name localization reference for this instance. |
String |
getValue()
Return the value for this instance. |
boolean |
hasBeenModified()
Return true if this instance has been modified.
|
int |
hashCode()
Return the hash code for this instance. |
void |
localize(LocalizedMessageSource messageSource)
Localize the display name if there is a localization refs for it. |
void |
resetModified()
Reset the modified flag for this instance such that hasBeenModified()
will return false . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GCEnumValue.EnumChoice(String value, String displayName) throws GCVException
EnumChoice
instance.
value
- String
value for choice.displayName
- String
for use in user interface naming
the enum choice.
GCVException
- thrown if:
value
is null
or emptydisplayName
is null
or emptypublic GCEnumValue.EnumChoice(String value, String displayName, String displayNameRef) throws GCVException
EnumChoice
instance.
value
- String
value for choice.displayName
- String
for use in user interface naming
the enum choice.
GCVException
- thrown if:
value
is null
or emptydisplayName
is null
or emptyMethod Detail |
public boolean hasBeenModified()
true
if this instance has been modified.
The instance is considered to have been modified if a change was made
that affects the persistent representation since:
resetModified()
was last called
true
or false
resetModified()
public void resetModified()
hasBeenModified()
will return false
.
hasBeenModified()
public String getValue()
null
, non-empty value.public String getDisplayName()
String
for this instance.
null
, non-empty String
.public String getDisplayNameRef()
String
, or null
.public int hashCode()
String
.
public boolean equals(Object o)
Object
is an EnumChoice
instance
and this instance's value matches the passed instance's value.
true
or false
public int compareTo(Object o)
Comparable
interface.
Returns -1
if passed Object
is not an EnumChoice
, otherwise,
returns getValue().compareTo(((EnumChoice)o).getValue())
.
compareTo
in interface Comparable
public void localize(LocalizedMessageSource messageSource)
If the display name localization refs, but the localized string
cannot be located in the passed LocalizedMessageSource
it is left unlocalized.
messageSource
- Source for localized strings.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |