I - public class OptionalIndexInput<I> extends ParseAbstractInput<java.lang.String> implements ListInput<java.lang.String,I>
ItemInput and will return the corresponding
element from the option map as the Item.validators| Constructor and Description |
|---|
OptionalIndexInput(Repository res,
java.util.Map<java.lang.String,I> options) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(InputVisitor<R> vis) |
int |
getCount()
get the number of suggested items.
|
I |
getItem()
get the domain Object associated with the current value
|
I |
getItembyValue(java.lang.String value)
get the domain object from the Input value if defined
|
java.util.Iterator<I> |
getItems()
get a list of domain objects that are being selected
|
java.lang.String |
getTagByItem(I item)
get an identifying tag string from the domain object
|
java.lang.String |
getTagByValue(java.lang.String value)
get the tag string from the actual value of the input
|
java.lang.String |
getText(I item)
get the user presented text from the domain object
may return null if not selected
|
boolean |
isValid(I item)
Test if an object of the Item type is one of the possible items.
|
java.lang.String |
parseValue(java.lang.String v)
Parse a String into the correct type for this input.
|
void |
setItem(I item)
Set the value of the input using an item
|
getBoxWidth, getMaxResultLength, getSingle, setBoxWidth, setMaxResultLength, setSinglegetValue, setKey, setValueaddValidator, convert, getKey, getPrettyString, getString, getString, removeValidator, validate, validateInnerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddValidator, convert, getKey, getPrettyString, getString, getValue, isEmpty, removeValidator, setKey, setValue, validategetString, parsepublic OptionalIndexInput(Repository res, java.util.Map<java.lang.String,I> options)
public <R> R accept(InputVisitor<R> vis) throws java.lang.Exception
accept in interface Input<java.lang.String>accept in class ParseAbstractInput<java.lang.String>java.lang.Exceptionpublic I getItem()
ItemInputpublic void setItem(I item)
ItemInputpublic java.lang.String parseValue(java.lang.String v)
throws ParseException
ParseInputInput.getString(Object) method.parseValue in interface ParseInput<java.lang.String>ParseExceptionpublic I getItembyValue(java.lang.String value)
ItemInputgetItembyValue in interface ItemInput<java.lang.String,I>value - input Valuepublic java.util.Iterator<I> getItems()
SuggestedItemInputgetItems in interface SuggestedItemInput<java.lang.String,I>public int getCount()
SuggestedItemInputgetCount in interface SuggestedItemInput<java.lang.String,I>public java.lang.String getTagByItem(I item)
ListInputgetTagByItem in interface ListInput<java.lang.String,I>public java.lang.String getTagByValue(java.lang.String value)
ListInputgetTagByValue in interface ListInput<java.lang.String,I>public java.lang.String getText(I item)
ListInput