E - the type of element.public class NamedArrayList<E> extends ArrayList<E>
ArrayList that also has an associated name for use with the FormTagLib.traits() tag.| Modifier and Type | Class and Description |
|---|---|
static interface |
NamedArrayList.Predicate<T>
Represents a predicate (boolean-valued function) of one argument.
|
modCount| Constructor and Description |
|---|
NamedArrayList(String name,
Collection<? extends E> c)
Copy constructor.
|
NamedArrayList(String name,
E... elements)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> NamedArrayList.Predicate<E> |
allOf(NamedArrayList.Predicate<? super E>... predicates)
Combines
NamedArrayList.Predicate instances using a boolean short-circuit logical AND. |
static <E> NamedArrayList.Predicate<E> |
anyOf(NamedArrayList.Predicate<E>... predicates)
Combines
NamedArrayList.Predicate instances using a boolean short-circuit logical OR. |
String |
getName()
Gets the associate name.
|
static <E> void |
select(List<? extends E> source,
String name,
NamedArrayList.Predicate<? super E> selector,
boolean removeSelectedFromSource,
List<NamedArrayList<? extends E>> destination)
Helper method that creates a new
NamedArrayList by selecting matching elements from a source list
and appends the new NamedArrayList to a list of NamedArrayList. |
static <E> void |
select(List<? extends E> source,
String name,
NamedArrayList.Predicate<? super E> selector,
boolean removeSelectedFromSource,
List<NamedArrayList<? extends E>> destination,
int index)
Helper method that creates a new
NamedArrayList by selecting matching elements from a source list
and appends the new NamedArrayList to a list of NamedArrayList. |
static <A extends Annotation> |
withAnnotation(Class<A> annotation)
Returns a
NamedArrayList.Predicate that checks if the object class has been annotated with the supplied
annotation. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic NamedArrayList(@NonNull
String name,
Collection<? extends E> c)
name - the name.c - the collection whose elements are to be placed into this list@NonNull public final String getName()
public static <E> void select(@NonNull
List<? extends E> source,
@NonNull
String name,
@CheckForNull
NamedArrayList.Predicate<? super E> selector,
boolean removeSelectedFromSource,
@NonNull
List<NamedArrayList<? extends E>> destination)
NamedArrayList by selecting matching elements from a source list
and appends the new NamedArrayList to a list of NamedArrayList.E - the type of element.source - the list of candidate elements.name - the name.selector - the (optional) selection criteria (if null then all candidate elements
will be added)removeSelectedFromSource - if true then the matching elements will be removed from the source.destination - the List of NamedArrayList to add to (empty selections will
not be added)public static <E> void select(@NonNull
List<? extends E> source,
@NonNull
String name,
@CheckForNull
NamedArrayList.Predicate<? super E> selector,
boolean removeSelectedFromSource,
@NonNull
List<NamedArrayList<? extends E>> destination,
int index)
NamedArrayList by selecting matching elements from a source list
and appends the new NamedArrayList to a list of NamedArrayList.E - the type of element.source - the list of candidate elements.name - the name.selector - the (optional) selection criteria (if null then all candidate elements
will be added)removeSelectedFromSource - if true then the matching elements will be removed from the source.destination - the List of NamedArrayList to add to (empty selections will
not be added)index - index at which the specified selection is to be inserted (will be coerced into
the valid range
to remove the risk of IndexOutOfBoundsException).public static <E> NamedArrayList.Predicate<E> allOf(NamedArrayList.Predicate<? super E>... predicates)
NamedArrayList.Predicate instances using a boolean short-circuit logical AND.E - type.predicates - the predicates to combine.public static <E> NamedArrayList.Predicate<E> anyOf(NamedArrayList.Predicate<E>... predicates)
NamedArrayList.Predicate instances using a boolean short-circuit logical OR.E - type.predicates - the predicates to combine.public static <A extends Annotation> NamedArrayList.Predicate<Object> withAnnotation(Class<A> annotation)
NamedArrayList.Predicate that checks if the object class has been annotated with the supplied
annotation.A - the type of annotation.annotation - the annotation to check.Copyright © 2016–2019. All rights reserved.