Class AddressList
- All Implemented Interfaces:
Serializable,Iterable<Address>,Collection<Address>,List<Address>
An immutable, random-access list of Address objects.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionAddressList(List<? extends Address> addresses) AddressList(List<? extends Address> addresses, boolean dontCopy) AddressList(Address... addresses) -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
addresses
-
-
Constructor Details
-
AddressList
- Parameters:
addresses- A List that contains only Address objects.dontCopy- true iff it is not possible for the addresses list to be modified by someone else.
-
AddressList
- Parameters:
addresses- A List that contains only Address objects.
-
AddressList
- Parameters:
addresses- A List that contains only Address objects.
-
-
Method Details
-
size
public int size()The number of elements in this list.- Specified by:
sizein interfaceCollection<Address>- Specified by:
sizein interfaceList<Address>- Specified by:
sizein classAbstractCollection<Address>
-
get
Gets an address. -
flatten
Returns a flat list of all mailboxes represented in this address list. Use this if you don't care about grouping.
-