dip.world
Class RuleOptions.Option

java.lang.Object
  extended bydip.world.RuleOptions.Option
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
RuleOptions

public static class RuleOptions.Option
extends java.lang.Object
implements java.io.Serializable

An Option is created for each type of Rule that may have more than one allowable option. The name of each Option must be unique.

See Also:
Serialized Form

Field Summary
protected  RuleOptions.OptionValue[] allowed
           
protected  RuleOptions.OptionValue defaultValue
           
protected  java.lang.String name
           
 
Constructor Summary
RuleOptions.Option(java.lang.String name, RuleOptions.OptionValue defaultValue, RuleOptions.OptionValue[] allowed)
          Create an Option.
 
Method Summary
 boolean checkValue(RuleOptions.OptionValue value)
          Checks if the given OptionValue is permitted; if so, returns true.
 boolean equals(java.lang.Object obj)
           
 RuleOptions.OptionValue[] getAllowed()
          Returns the allowed Option values.
 RuleOptions.OptionValue getDefault()
          Returns the default Option value.
 java.lang.String getDescriptionI18N()
          Gets the internationalized ("display") version of the description.
 java.lang.String getName()
          Returns the Option name.
 java.lang.String getNameI18N()
          Gets the internationalized ("display") version of the name.
 int hashCode()
           
 boolean isAllowed(RuleOptions.OptionValue optionValue)
          Checks if the given optionValue is allowed.
protected  java.lang.Object readResolve()
           
 java.lang.String toString()
          For debugging only
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

allowed

protected final RuleOptions.OptionValue[] allowed

defaultValue

protected final RuleOptions.OptionValue defaultValue
Constructor Detail

RuleOptions.Option

public RuleOptions.Option(java.lang.String name,
                          RuleOptions.OptionValue defaultValue,
                          RuleOptions.OptionValue[] allowed)
Create an Option.

Method Detail

getName

public java.lang.String getName()
Returns the Option name.


getDefault

public RuleOptions.OptionValue getDefault()
Returns the default Option value.


getAllowed

public RuleOptions.OptionValue[] getAllowed()
Returns the allowed Option values.


isAllowed

public boolean isAllowed(RuleOptions.OptionValue optionValue)
Checks if the given optionValue is allowed.


getNameI18N

public java.lang.String getNameI18N()
Gets the internationalized ("display") version of the name.


getDescriptionI18N

public java.lang.String getDescriptionI18N()
Gets the internationalized ("display") version of the description.


checkValue

public boolean checkValue(RuleOptions.OptionValue value)
Checks if the given OptionValue is permitted; if so, returns true.


equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException

toString

public java.lang.String toString()
For debugging only



Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.