|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoapi.ModOption<E>
public abstract class ModOption<E>
Abstract base class for individual option classes
Field Summary | |
---|---|
protected MOCallback |
callback
The callback object |
protected boolean |
global
If we should use the global value |
protected E |
localValue
Local/ server value f this option |
protected java.lang.String |
name
Given name for this option selector |
protected E |
value
Global Value of this option selector |
Constructor Summary | |
---|---|
protected |
ModOption(java.lang.String id)
Default constructor, requires an ID |
protected |
ModOption(java.lang.String id,
java.lang.String name)
Default constructor with a name |
Method Summary | |
---|---|
MOCallback |
getCallback()
Returns the callback |
E |
getGlobalValue()
Returs the global value of this option |
java.lang.String |
getID()
Get the ID of this option selector |
E |
getLocalValue()
Get the local value |
java.lang.String |
getName()
Return the name of this option selector |
E |
getValue()
Get value of this option selector |
E |
getValue(boolean scope)
Get the value of this selector from the scope given in the first parameter |
boolean |
hasCallback()
Check if this option has a callback |
void |
setCallback(MOCallback callback)
Set the callback for this option |
void |
setGlobal(boolean global)
Set the scope of the value |
void |
setGlobalValue(E value)
Sets global value of this option |
void |
setLocalValue(E value)
Sets the local value of this option |
protected void |
setName(java.lang.String name)
Set the name of this option |
void |
setValue(E value)
Set the current used value of this option selector |
void |
setValue(E value,
boolean scope)
Set the current value used for the given scope |
boolean |
useGlobalValue()
Set this option to only use the global value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected E value
protected E localValue
protected boolean global
protected MOCallback callback
Constructor Detail |
---|
protected ModOption(java.lang.String id)
id
- Identifier for this optionprotected ModOption(java.lang.String id, java.lang.String name)
id
- Identified for this optionname
- Name for this optionMethod Detail |
---|
protected void setName(java.lang.String name)
name
- New name for this optionpublic void setValue(E value)
value
- New valuepublic void setValue(E value, boolean scope)
value
- New value for scopescope
- Scope value. True for globalpublic void setLocalValue(E value)
value
- New valuepublic void setGlobalValue(E value)
value
- New valuepublic void setGlobal(boolean global)
global
- True if use global value onlypublic void setCallback(MOCallback callback)
callback
- The callback to setpublic final java.lang.String getID()
public java.lang.String getName()
public E getValue()
public E getValue(boolean scope)
scope
- True for global value
public E getGlobalValue()
public E getLocalValue()
public boolean useGlobalValue()
public MOCallback getCallback()
public boolean hasCallback()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |