|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gridshell.getopt.app.StorableImpl
An implemenation of Storable
| Constructor Summary | |
StorableImpl(String description,
Class type,
boolean isRequired,
Object defaultValue)
A Constructor for a Storable |
|
| Method Summary | |
String |
getDescription()
Returns the description |
Class |
getType()
Returns the type |
static Map |
getValidators()
Returns an immutable mapping of validators |
Object |
getValue()
Returns the value based upon the validator associated with this type |
boolean |
isRequired()
Tells if this is required or not |
boolean |
isSet()
Sees if this is set to non-null and not FALSE |
static void |
resetDefaultValidators()
Remove all validators and then sets the default validators, synchronized on validators |
static void |
setValidator(Class type,
Validator validator)
Adds a validator |
void |
setValue(Object value)
Sets the value, if it is a String it reuses the validator associated with this type |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StorableImpl(String description,
Class type,
boolean isRequired,
Object defaultValue)
description - - the descriptiontype - - The type of this storableisRequired - - Is this storable requrieddefaultValue - - A default value for the storable| Method Detail |
public static void resetDefaultValidators()
public static void setValidator(Class type,
Validator validator)
type - - the type identified by a class that will be validatedvalidator - - the validator for the class, if it is null removes a validator for this classpublic static Map getValidators()
public String getDescription()
Storable
getDescription in interface Storablepublic Class getType()
Storable
getType in interface Storablepublic Object getValue()
Storable
getValue in interface Storablepublic boolean isRequired()
Storable
isRequired in interface Storablepublic boolean isSet()
Storable
isSet in interface Storablepublic void setValue(Object value)
Storable
setValue in interface Storablevalue - public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||