corny.addressbook.data
Class MutableMultiValue<T>
java.lang.Object
corny.addressbook.data.MultiValue<T>
corny.addressbook.data.MutableMultiValue<T>
- Type Parameters:
T
- Type of Values in this MultiValue instance
- All Implemented Interfaces:
- Searchable, java.lang.Iterable<MultiValue.KeyValuePair<T>>
public class MutableMultiValue<T>
- extends MultiValue<T>
Data model class for multi value properties of Address Book contacts, like a
list of phone numbers.
This subclass implements methods to modify the content of the MultiValue
instance.
- Author:
- Corny
Methods inherited from class corny.addressbook.data.MultiValue |
addSearchStringsToList, equals, getFirstHomeValue, getFirstMobileValue, getFirstValue, getFirstWorkValue, getValues, iterator, mutableClone, size, toString, translateBackwards |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
MutableMultiValue
public MutableMultiValue()
- Creates a new, empty MutableMultiValue instance.
MutableMultiValue
public MutableMultiValue(java.util.List<MultiValue.KeyValuePair<T>> pairs)
- Creates a new MutableMultiValue.
- Parameters:
pairs
- Pairs of the new MutableMultiValue
getValues
public java.util.List<MultiValue.KeyValuePair<T>> getValues()
- Returns:
- All KeyValuePairs of this MultiValue instance
addValue
public void addValue(MultiValue.KeyValuePair<T> value)
- Adds a value to the end of the List
- Parameters:
value
- New value
addValue
public void addValue(MultiValue.KeyValuePair<T> value,
int index)
- Adds a value at the specified index of the list
- Parameters:
value
- New valueindex
- List index