|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mcdermottroe.exemplar.ui.options.Option<T>
T - The type of Option this is.public abstract class Option<T extends Option<T>>
An option data type.
| Field Summary | |
|---|---|
protected boolean |
caseSensitive
Whether or not the option is case sensitive. |
protected String |
description
A textual description of the option. |
protected boolean |
mandatory
Whether the option must be present or not. |
protected boolean |
multiValue
Whether or not the option takes multiple values. |
protected String |
name
The name of the option. |
protected List<String> |
value
The current value(s) of the option. |
| Constructor Summary | |
|---|---|
protected |
Option(String optionName,
String optionDesc,
boolean optionMandatory,
boolean optionMultiValue,
boolean optionCaseSensitive)
Simple constructor which initialises all of the member variables with given values. |
| Method Summary | |
|---|---|
int |
compareTo(T other)
Implement Comparable.compareTo(Object). |
boolean |
equals(Object o)
See Object.equals(Object). |
String |
getDescription()
Accessor for the description member. |
String |
getName()
Accessor for the name member. |
List<String> |
getValue()
Accessor for the value member. |
int |
hashCode()
See Object.hashCode(). |
boolean |
isCaseSensitive()
Accessor for the caseSensitive member. |
boolean |
isMandatory()
Accessor for the mandatory member. |
boolean |
isMultiValue()
Accessor for the multiValue member. |
void |
setValue(List<String> newValue)
Setter for the value member. |
String |
toString()
See Object.toString(). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.mcdermottroe.exemplar.Copyable |
|---|
getCopy |
| Field Detail |
|---|
protected final String name
protected List<String> value
protected final String description
protected final boolean mandatory
protected final boolean multiValue
protected final boolean caseSensitive
| Constructor Detail |
|---|
protected Option(String optionName,
String optionDesc,
boolean optionMandatory,
boolean optionMultiValue,
boolean optionCaseSensitive)
optionName - The value for the member name.optionDesc - The value for the member description.optionMandatory - The value for the member mandatory.optionMultiValue - The value for the member multiValue.optionCaseSensitive - The value for the member caseSensitive.| Method Detail |
|---|
public int compareTo(T other)
Comparable.compareTo(Object).
compareTo in interface Comparable<T extends Option<T>>other - The Option to compare with.
Comparable.compareTo(Object).public String getName()
public List<String> getValue()
public void setValue(List<String> newValue)
newValue - The list to copy into the value member.public String getDescription()
public boolean isMandatory()
public boolean isMultiValue()
public boolean isCaseSensitive()
public boolean equals(Object o)
Object.equals(Object).
equals in class Objecto - The other object to compare with.
this equals o.public int hashCode()
Object.hashCode().
hashCode in class Objectpublic String toString()
Object.toString().
toString in class ObjectString
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||