|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.model.ui.AbstractPresentationModel
com.guiseframework.component.AbstractComponent
com.guiseframework.component.AbstractCompositeComponent
com.guiseframework.component.AbstractMultipleCompositeComponent
com.guiseframework.component.AbstractCompositeStateComponent<T,S>
com.guiseframework.component.AbstractCompositeStateControl<V,AbstractListSelectControl.ValueComponentState>
com.guiseframework.component.AbstractListSelectControl<V>
V - The type of values to select.public abstract class AbstractListSelectControl<V>
Abstract implementation of a control to allow selection by the user of a value from a list.
The component valid status is updated before a change in the ValueModel.VALUE_PROPERTY or the ValueModel.VALIDATOR_PROPERTY is fired.
This implementation does not yet fully support elements that appear more than once in the model.
| Nested Class Summary | |
|---|---|
static class |
AbstractListSelectControl.ConverterInfoModelValueRepresentationStrategy<VV>
A list select value representation strategy that creates a component by converting the value to a info model. |
static class |
AbstractListSelectControl.DefaultValueRepresentationStrategy<VV>
A default list select value representation strategy that creates a Label. |
protected static class |
AbstractListSelectControl.ValueComponentState
An encapsulation of a component for a tree node along with other metadata, such as whether the component was editable when created. |
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractCompositeStateComponent |
|---|
AbstractCompositeStateComponent.ComponentState |
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractComponent |
|---|
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.ListSelectControl |
|---|
ListSelectControl.ValueRepresentationStrategy<VV> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Control |
|---|
Control.Status |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.component.SelectControl |
|---|
VALUE_REPRESENTATION_STRATEGY_PROPERTY |
| Fields inherited from interface com.guiseframework.component.ValueControl |
|---|
CONVERTER_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Control |
|---|
STATUS_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Component |
|---|
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Displayable |
|---|
DISPLAYED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.Enableable |
|---|
ENABLED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.ValueModel |
|---|
VALIDATOR_PROPERTY, VALUE_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractListSelectControl(ListSelectModel<V> listSelectModel,
ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
List select model and value representation strategy constructor. |
|
| Method Summary | ||
|---|---|---|
void |
add(int index,
V value)
Inserts the specified value at the specified position in this model. |
|
boolean |
add(V value)
Appends the specified value to the end of this model. |
|
boolean |
addAll(java.util.Collection<? extends V> collection)
Appends all of the values in the specified collection to the end of this model, in the order that they are returned by the specified collection's iterator. |
|
boolean |
addAll(int index,
java.util.Collection<? extends V> collection)
Inserts all of the values in the specified collection into this model at the specified position. |
|
void |
addListListener(ListListener<V> listListener)
Adds a list listener. |
|
void |
addListSelectionListener(ListSelectionListener<V> selectionListener)
Adds a list selection listener. |
|
void |
addSelectedIndexes(int... indexes)
Adds a selection at the given indices. |
|
void |
clear()
Removes all of the values from this model. |
|
void |
clearValue()
Clears the value by setting the value to null, which may be invalid according to any installed validators. |
|
boolean |
contains(java.lang.Object value)
Determines whether this model contains the specified value. |
|
boolean |
containsAll(java.util.Collection<?> collection)
Determines if this model contains all of the values of the specified collection. |
|
protected AbstractListSelectControl.ValueComponentState |
createComponentState(V value)
Creates a component state to represent the given object. |
|
protected boolean |
determineValid()
Checks the state of the component for validity. |
|
protected void |
fireListModified(int index,
V addedElement,
V removedElement)
Fires an event to all registered list listeners indicating the list was modified. |
|
protected
|
firePropertyChange(java.lang.String propertyName,
VV oldValue,
VV newValue)
Reports that a bound property has changed. |
|
protected void |
fireSelectionChanged(java.lang.Integer addedIndex,
java.lang.Integer removedIndex)
Fires an event to all registered selection listeners indicating the selection changed. |
|
V |
get(int index)
Returns the value at the specified position in this model. |
|
Component |
getComponent(V value)
Retrieves the component for the given object. |
|
V |
getDefaultValue()
|
|
protected ListSelectModel<V> |
getListSelectModel()
|
|
int |
getSelectedIndex()
Determines the selected index. |
|
int[] |
getSelectedIndexes()
Determines the selected indices. |
|
V |
getSelectedValue()
Determines the selected value. |
|
V[] |
getSelectedValues()
Determines the selected values. |
|
ListSelectionPolicy<V> |
getSelectionPolicy()
|
|
Validator<V> |
getValidator()
|
|
V |
getValue()
|
|
java.lang.Class<V> |
getValueClass()
|
|
ListSelectControl.ValueRepresentationStrategy<V> |
getValueRepresentationStrategy()
|
|
int |
indexOf(java.lang.Object value)
Returns the index in this model of the first occurrence of the specified value, or -1 if this model does not contain this value. |
|
boolean |
isEmpty()
|
|
boolean |
isIndexDisplayed(int index)
Determines the displayed status of a given index. |
|
boolean |
isIndexEnabled(int index)
Determines the enabled status of a given index. |
|
boolean |
isValidValue()
Determines whether the value of this model is valid. |
|
boolean |
isValueDisplayed(V value)
Determines the displayed status of the first occurrence of a given value. |
|
boolean |
isValueEnabled(V value)
Determines the enabled status of the first occurrence of a given value. |
|
java.util.Iterator<V> |
iterator()
|
|
int |
lastIndexOf(java.lang.Object value)
Returns the index in this model of the last occurrence of the specified value, or -1 if this model does not contain this value. |
|
java.util.ListIterator<V> |
listIterator()
|
|
java.util.ListIterator<V> |
listIterator(int index)
Returns a list iterator of the values in this model (in proper sequence), starting at the specified position in this model. |
|
V |
remove(int index)
Removes the value at the specified position in this model. |
|
boolean |
remove(java.lang.Object value)
Removes the first occurrence in this model of the specified value. |
|
boolean |
removeAll(java.util.Collection<?> collection)
Removes from this model all the values that are contained in the specified collection. |
|
void |
removeListListener(ListListener<V> listListener)
Removes a list listener. |
|
void |
removeListSelectionListener(ListSelectionListener<V> selectionListener)
Removes a list selection listener. |
|
void |
removeSelectedIndexes(int... indexes)
Removes a selection at the given indices. |
|
boolean |
replace(V oldValue,
V newValue)
Replaces the first occurrence in the of the given value with its replacement. |
|
void |
reset()
Resets the control to its default value. |
|
void |
resetValue()
Resets the value to a default value, which may be invalid according to any installed validators. |
|
boolean |
retainAll(java.util.Collection<?> collection)
Retains only the values in this model that are contained in the specified collection. |
|
V |
set(int index,
V value)
Replaces the value at the specified position in this model with the specified value. |
|
void |
setIndexDisplayed(int index,
boolean newDisplayed)
Sets the displayed status of a given index. |
|
void |
setIndexEnabled(int index,
boolean newEnabled)
Sets the enabled status of a given index. |
|
void |
setSelectedIndexes(int... indexes)
Sets the selected indices. |
|
void |
setSelectedValues(V... values)
Sets the selected values. |
|
void |
setValidator(Validator<V> newValidator)
Sets the validator. |
|
void |
setValue(V newValue)
Sets the input value. |
|
void |
setValueDisplayed(V value,
boolean newDisplayed)
Sets the displayed status of the first occurrence of a given value. |
|
void |
setValueEnabled(V value,
boolean newEnabled)
Sets the enabled status of the first occurrence of a given value. |
|
void |
setValueRepresentationStrategy(ListSelectControl.ValueRepresentationStrategy<V> newValueRepresentationStrategy)
Sets the strategy used to generate a component to represent each value in the model. |
|
int |
size()
|
|
java.util.List<V> |
subList(int fromIndex,
int toIndex)
Returns a read-only view of the portion of this model between the specified fromIndex, inclusive, and toIndex, exclusive. |
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] array)
Returns an array containing all of the values in this model. |
|
boolean |
validate()
Validates the user input of this component and all child components. |
|
void |
validateValue()
Validates the value of this model, throwing an exception if the model is not valid. |
|
| Methods inherited from class com.guiseframework.component.AbstractCompositeStateControl |
|---|
determineStatus, getEnableable, getStatus, isEnabled, setEnabled, setNotification, setStatus, updateStatus, updateValid |
| Methods inherited from class com.guiseframework.component.AbstractCompositeStateComponent |
|---|
clearComponentStates, determineComponentState, getComponentState, getComponentStates, getObject, putComponentState, removeComponentState |
| Methods inherited from class com.guiseframework.component.AbstractMultipleCompositeComponent |
|---|
addComponent, getChildComponents, hasChildComponents, removeComponent |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.component.Control |
|---|
getStatus |
| Methods inherited from interface com.guiseframework.platform.DepictedObject |
|---|
depict, getDepictID, getSession, processEvent |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from interface com.guiseframework.model.Enableable |
|---|
isEnabled, setEnabled |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractListSelectControl(ListSelectModel<V> listSelectModel,
ListSelectControl.ValueRepresentationStrategy<V> valueRepresentationStrategy)
listSelectModel - The component list select model.valueRepresentationStrategy - The strategy to create controls to represent this model's values.
java.lang.NullPointerException - if the given list select model and/or value representation strategy is null.| Method Detail |
|---|
protected ListSelectModel<V> getListSelectModel()
public ListSelectControl.ValueRepresentationStrategy<V> getValueRepresentationStrategy()
getValueRepresentationStrategy in interface ListSelectControl<V>public void setValueRepresentationStrategy(ListSelectControl.ValueRepresentationStrategy<V> newValueRepresentationStrategy)
setValueRepresentationStrategy in interface ListSelectControl<V>newValueRepresentationStrategy - The new strategy to create components to represent this model's values.
java.lang.NullPointerException - if the provided value representation strategy is null.SelectControl.VALUE_REPRESENTATION_STRATEGY_PROPERTYpublic Component getComponent(V value)
getComponent in interface ListSelectControl<V>getComponent in class AbstractCompositeStateComponent<V,AbstractListSelectControl.ValueComponentState>value - The object for which a representation component should be returned.
java.lang.IllegalArgumentException - if the given object is not an appropriate object for a component to be created.protected AbstractListSelectControl.ValueComponentState createComponentState(V value)
createComponentState in class AbstractCompositeStateComponent<V,AbstractListSelectControl.ValueComponentState>value - The object with which the component state is to be associated.
java.lang.IllegalArgumentException - if the given object is not an appropriate object for a component state to be created.
protected <VV> void firePropertyChange(java.lang.String propertyName,
VV oldValue,
VV newValue)
firePropertyChange in class com.globalmentor.beans.BoundPropertyObjectpropertyName - The name of the property being changed.oldValue - The old property value.newValue - The new property value.BoundPropertyObject.firePropertyChange(PropertyChangeEvent),
BoundPropertyObject.hasPropertyChangeListeners(String),
GenericPropertyChangeEvent,
GenericPropertyChangeListenerprotected boolean determineValid()
determineValid in class AbstractCompositeComponenttrue if the component and all children passes all validity tests, else false.public boolean validate()
validate in interface Componentvalidate in class AbstractCompositeComponentAbstractComponent.isValid() as a convenience.public void reset()
reset in interface Controlreset in class AbstractCompositeStateControl<V,AbstractListSelectControl.ValueComponentState>resetValue()public V getDefaultValue()
getDefaultValue in interface ValueModel<V>public V getValue()
getValue in interface ValuedComponent<V>getValue in interface Valued<V>getValue in interface ValueModel<V>null if there is no input value.
public void setValue(V newValue)
throws java.beans.PropertyVetoException
equals() method.
If a validator is installed, the value will first be validated before the current value is changed.
Validation always occurs if a validator is installed, even if the value is not changing.
If the value change is vetoed by the installed validator, the validation exception will be accessible via Throwable.getCause().
setValue in interface ValuedComponent<V>setValue in interface Valued<V>setValue in interface ValueModel<V>newValue - The input value of the model.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.getValidator(),
ValueModel.VALUE_PROPERTYpublic void clearValue()
null, which may be invalid according to any installed validators.
No validation occurs.
clearValue in interface ValueModel<V>ValueModel.VALUE_PROPERTYpublic void resetValue()
resetValue in interface ValueModel<V>ValueModel.VALUE_PROPERTYpublic Validator<V> getValidator()
getValidator in interface ValueModel<V>null if no validator is installed.public void setValidator(Validator<V> newValidator)
setValidator in interface ValueModel<V>newValidator - The validator for this model, or null if no validator should be used.ValueModel.VALIDATOR_PROPERTYpublic boolean isValidValue()
isValidValue in interface ValueModel<V>
public void validateValue()
throws ValidationException
validateValue in interface ValueModel<V>ValidationException - if the value of this model is not valid.public java.lang.Class<V> getValueClass()
getValueClass in interface ValuedComponent<V>getValueClass in interface ValueModel<V>
public boolean replace(V oldValue,
V newValue)
replace in interface SelectModel<V>oldValue - The value for which to search.newValue - The replacement value.
public V getSelectedValue()
getSelectedValue in interface SelectModel<V>null if no value is currently selected.public V[] getSelectedValues()
getSelectedValues in interface SelectModel<V>
public void setSelectedValues(V... values)
throws java.beans.PropertyVetoException
Throwable.getCause().
This method delegates to the selection strategy.
setSelectedValues in interface SelectModel<V>values - The values to select.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.public ListSelectionPolicy<V> getSelectionPolicy()
getSelectionPolicy in interface ListSelectModel<V>public int getSelectedIndex()
getSelectedIndex in interface ListSelectModel<V>getSelectedValue()public int[] getSelectedIndexes()
getSelectedIndexes in interface ListSelectModel<V>getSelectedValues()
public void setSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
setSelectedIndexes in interface ListSelectModel<V>indexes - The indices to select.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getSetSelectedIndices(ListSelectModel, int[]),
#setSelectedValues(V[]),
addSelectedIndexes(int...)
public void addSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
addSelectedIndexes in interface ListSelectModel<V>indexes - The indices to add to the selection.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getAddSelectedIndices(ListSelectModel, int[]),
setSelectedIndexes(int[])
public void removeSelectedIndexes(int... indexes)
throws java.beans.PropertyVetoException
Throwable.getCause().
removeSelectedIndexes in interface ListSelectModel<V>indexes - The indices to remove from the selection.
java.beans.PropertyVetoException - if the provided value is not valid or the change has otherwise been vetoed.ListSelectionPolicy.getRemoveSelectedIndices(ListSelectModel, int[]),
setSelectedIndexes(int[])public boolean isValueDisplayed(V value)
isValueDisplayed in interface ListSelectModel<V>value - The value for which the displayed status is to be determined.
true if the value is displayed, else false.
java.lang.IndexOutOfBoundsException - if the given value does not occur in the model.
public void setValueDisplayed(V value,
boolean newDisplayed)
setValueDisplayed in interface ListSelectModel<V>value - The value to enable or disable.newDisplayed - Whether the value should be displayed.Displayable.DISPLAYED_PROPERTYpublic boolean isIndexDisplayed(int index)
isIndexDisplayed in interface ListSelectModel<V>index - The index of the value for which the displayed status is to be determined.
true if the value at the given index is displayed, else false.
public void setIndexDisplayed(int index,
boolean newDisplayed)
setIndexDisplayed in interface ListSelectModel<V>index - The index of the value to enable or disable.newDisplayed - Whether the value at the given index should be displayed.
java.lang.IndexOutOfBoundsException - if the given index is not within the range of the list.Displayable.DISPLAYED_PROPERTYpublic boolean isValueEnabled(V value)
isValueEnabled in interface ListSelectModel<V>value - The value for which the enabled status is to be determined.
true if the value is enabled, else false.
java.lang.IndexOutOfBoundsException - if the given value does not occur in the model.
public void setValueEnabled(V value,
boolean newEnabled)
setValueEnabled in interface ListSelectModel<V>value - The value to enable or disable.newEnabled - Whether the value should be enabled.Enableable.ENABLED_PROPERTYpublic boolean isIndexEnabled(int index)
isIndexEnabled in interface ListSelectModel<V>index - The index of the value for which the enabled status is to be determined.
true if the value at the given index is enabled, else false.
public void setIndexEnabled(int index,
boolean newEnabled)
setIndexEnabled in interface ListSelectModel<V>index - The index of the value to enable or disable.newEnabled - Whether the value at the given index should be enabled.
java.lang.IndexOutOfBoundsException - if the given index is not within the range of the list.Enableable.ENABLED_PROPERTYpublic void addListListener(ListListener<V> listListener)
addListListener in interface ListListenable<V>addListListener in interface ListSelectModel<V>listListener - The list listener to add.public void removeListListener(ListListener<V> listListener)
removeListListener in interface ListListenable<V>removeListListener in interface ListSelectModel<V>listListener - The list listener to remove.public void addListSelectionListener(ListSelectionListener<V> selectionListener)
addListSelectionListener in interface ListSelectModel<V>selectionListener - The selection listener to add.public void removeListSelectionListener(ListSelectionListener<V> selectionListener)
removeListSelectionListener in interface ListSelectModel<V>selectionListener - The selection listener to remove.
protected void fireListModified(int index,
V addedElement,
V removedElement)
index - The index at which an element was added and/or removed, or -1 if the index is unknown.addedElement - The element that was added to the list, or null if no element was added or it is unknown whether or which elements were added.removedElement - The element that was removed from the list, or null if no element was removed or it is unknown whether or which elements were removed.ListListener,
ListEvent
protected void fireSelectionChanged(java.lang.Integer addedIndex,
java.lang.Integer removedIndex)
addedIndex - The index that was added to the selection, or null if no index was added or it is unknown whether or which indices were added.removedIndex - The index that was removed from the list, or null if no index was removed or it is unknown whether or which indices were removed.ListSelectionListener,
ListSelectionEventpublic int size()
size in interface java.util.Collection<V>size in interface java.util.List<V>public boolean isEmpty()
isEmpty in interface java.util.Collection<V>isEmpty in interface java.util.List<V>public boolean contains(java.lang.Object value)
contains in interface java.util.Collection<V>contains in interface java.util.List<V>value - The value the presence of which to test.
true if this model contains the specified value.public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V>iterator in interface java.util.Collection<V>iterator in interface java.util.List<V>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<V>toArray in interface java.util.List<V>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<V>toArray in interface java.util.List<V>array - The array into which the value of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
java.lang.ArrayStoreException - if the runtime type of the specified array is not a supertype of the runtime type of every value in this model.
java.lang.NullPointerException - if the specified array is null.public boolean add(V value)
add(int, Object).
add in interface java.util.Collection<V>add in interface java.util.List<V>value - The value to be appended to this model.
true, indicating that the model changed as a result of the operation.public boolean remove(java.lang.Object value)
remove in interface java.util.Collection<V>remove in interface java.util.List<V>value - The value to be removed from this model, if present.
true if this model contained the specified value.public boolean containsAll(java.util.Collection<?> collection)
containsAll in interface java.util.Collection<V>containsAll in interface java.util.List<V>collection - The collection to be checked for containment in this model.
true if this model contains all of the values of the specified collection.
java.lang.NullPointerException - if the specified collection is null.contains(Object)public boolean addAll(java.util.Collection<? extends V> collection)
addAll in interface java.util.Collection<V>addAll in interface java.util.List<V>collection - The collection the values of which are to be added to this model.
true if this model changed as a result of the call.
java.lang.NullPointerException - if the specified collection is null.add(Object)
public boolean addAll(int index,
java.util.Collection<? extends V> collection)
addAll in interface java.util.List<V>index - The index at which to insert first value from the specified collection.collection - The values to be inserted into this model.
true if this model changed as a result of the call.
java.lang.NullPointerException - if the specified collection is null.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).public boolean removeAll(java.util.Collection<?> collection)
removeAll in interface java.util.Collection<V>removeAll in interface java.util.List<V>collection - The collection that defines which values will be removed from this model.
true if this model changed as a result of the call.
java.lang.NullPointerException - if the specified collection is null.remove(Object),
contains(Object)public boolean retainAll(java.util.Collection<?> collection)
retainAll in interface java.util.Collection<V>retainAll in interface java.util.List<V>collection - The collection that defines which values this model will retain.
true if this model changed as a result of the call.
java.lang.NullPointerException - if the specified collection is null.remove(Object),
contains(Object)public void clear()
clear in interface java.util.Collection<V>clear in interface java.util.List<V>public V get(int index)
get in interface java.util.List<V>index - The index of the value to return.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).
public V set(int index,
V value)
set in interface java.util.List<V>index - The index of the value to replace.value - The value to be stored at the specified position.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).
public void add(int index,
V value)
add in interface java.util.List<V>index - The index at which the specified value is to be inserted.value - The value to be inserted.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).public V remove(int index)
remove in interface java.util.List<V>index - The index of the value to removed.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).public int indexOf(java.lang.Object value)
indexOf in interface java.util.List<V>value - The value for which to search.
public int lastIndexOf(java.lang.Object value)
lastIndexOf in interface java.util.List<V>value - The value for which to search.
public java.util.ListIterator<V> listIterator()
listIterator in interface java.util.List<V>public java.util.ListIterator<V> listIterator(int index)
listIterator in interface java.util.List<V>index - The index of first value to be returned from the list iterator (by a call to the next() method).
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).
public java.util.List<V> subList(int fromIndex,
int toIndex)
subList in interface java.util.List<V>fromIndex - The low endpoint (inclusive) of the sub-list.toIndex - The high endpoint (exclusive) of the sub-list.
java.lang.IndexOutOfBoundsException - for an illegal endpoint index value (fromIndex < 0 || toIndex > size() || fromIndex > toIndex).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||