public class Options extends AbstractSet<OptionEntry> implements Cloneable, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Options.InsertPos |
| Constructor and Description |
|---|
Options() |
Options(Class<?> enumType) |
Options(OptionEntry[] entries) |
Options(Options other) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object value,
String text,
boolean active)
Adds an object, the check for an existing can be skipped for
performance issues (not recommended!)
|
boolean |
add(OptionEntry option) |
void |
addXml(Element element,
DataType dataType)
Adds all these options to the xml element
|
void |
clear() |
Options |
clone() |
boolean |
contains(Object value) |
boolean |
containsNull() |
protected OptionEntry |
createOptionEntry(Object value,
String text,
boolean active) |
String |
get(Object value) |
OptionEntry |
getEntry(Object value) |
protected int |
getIndex(Object value) |
String |
getTextAt(int i)
Gets the text of the entry at index i
|
Object |
getValueAt(int i)
Gets the value of the entry at index i
|
Set<Object> |
getValues() |
boolean |
has(Object value)
same as contains(), but IDE may not issue warning
|
boolean |
isActive(Object value) |
boolean |
isEmpty() |
Iterator<OptionEntry> |
iterator() |
boolean |
remove(Object value) |
void |
set(Object value,
String text)
Sets or adds Adds an option at the bottom
|
void |
set(Object value,
String text,
boolean active,
Options.InsertPos pos)
Sets or Adds an option at a certain position
|
void |
set(Object value,
String text,
Options.InsertPos pos)
Sets or Adds an option at a certain position
|
int |
size() |
Object[] |
toArray() |
String |
toString() |
equals, hashCode, removeAlladdAll, containsAll, retainAll, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, retainAll, spliterator, toArrayparallelStream, removeIf, streampublic Options()
public Options(Options other)
public Options(OptionEntry[] entries)
public Options(Class<?> enumType)
protected int getIndex(Object value)
protected OptionEntry createOptionEntry(Object value, String text, boolean active)
public OptionEntry getEntry(Object value)
public boolean isActive(Object value)
public Object getValueAt(int i)
i - the indexnull if not foundpublic String getTextAt(int i)
i - the indexpublic void set(Object value, String text, boolean active, Options.InsertPos pos)
value - the value objecttext - the textactive - flag if element is active (selectable)pos - the position, see Options.InsertPospublic void set(Object value, String text, Options.InsertPos pos)
value - the value objecttext - the textpos - the position, see Options.InsertPospublic void set(Object value, String text)
value - the value objecttext - the textpublic void add(Object value, String text, boolean active)
value - the valuetext - the textactive - flag if element is active (selectable)public boolean add(OptionEntry option)
add in interface Collection<OptionEntry>add in interface Set<OptionEntry>add in class AbstractCollection<OptionEntry>public void clear()
clear in interface Collection<OptionEntry>clear in interface Set<OptionEntry>clear in class AbstractCollection<OptionEntry>public boolean contains(Object value)
contains in interface Collection<OptionEntry>contains in interface Set<OptionEntry>contains in class AbstractCollection<OptionEntry>public boolean containsNull()
public boolean has(Object value)
value - the value to checkpublic boolean isEmpty()
isEmpty in interface Collection<OptionEntry>isEmpty in interface Set<OptionEntry>isEmpty in class AbstractCollection<OptionEntry>public Iterator<OptionEntry> iterator()
iterator in interface Iterable<OptionEntry>iterator in interface Collection<OptionEntry>iterator in interface Set<OptionEntry>iterator in class AbstractCollection<OptionEntry>public boolean remove(Object value)
remove in interface Collection<OptionEntry>remove in interface Set<OptionEntry>remove in class AbstractCollection<OptionEntry>public int size()
size in interface Collection<OptionEntry>size in interface Set<OptionEntry>size in class AbstractCollection<OptionEntry>public Object[] toArray()
toArray in interface Collection<OptionEntry>toArray in interface Set<OptionEntry>toArray in class AbstractCollection<OptionEntry>public String toString()
toString in class AbstractCollection<OptionEntry>Copyright © 2008–2023 Apache Software Foundation. All rights reserved.