|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<E> org.tinyjee.maven.dim.utils.SelectableArrayList<E>
public class SelectableArrayList<E>
Implements an array list that allows sub-list selections via regular expressions and / or selectors.
Nested Class Summary | |
---|---|
static interface |
SelectableArrayList.Selector<E>
Defines a selector to be used when selecting a sub-list. |
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
SelectableArrayList()
|
|
SelectableArrayList(Collection<? extends E> collection)
|
|
SelectableArrayList(int initialCapacity)
|
Method Summary | |
---|---|
SelectableArrayList<E> |
clone()
|
SelectableArrayList.Selector<E> |
createInvertSelector(SelectableArrayList.Selector<E> other)
Creates a selector that inverts the given selector. |
SelectableArrayList.Selector<E> |
createOrSelector(SelectableArrayList.Selector<E>... selectors)
Creates a selector that combines the given selectors with OR (accepts the element if one of the given selectors accepts it). |
SelectableArrayList.Selector<E> |
createRegularExpressionSelector(String regularExpression)
Creates a selector that matches the given regular expression against the string representation of the element to select. |
SelectableArrayList<E> |
select(SelectableArrayList.Selector<E> selector)
Selects a sub list of all elements that were matched by the given selector. |
SelectableArrayList<E> |
selectMatching(String... regularExpressions)
Selects all elements whose string representation matches the one of given regular expressions. |
SelectableArrayList<E> |
selectMatching(String regularExpression)
Selects all elements whose string representation matches the given regular expression. |
SelectableArrayList<E> |
selectNonMatching(String regularExpression)
Selects all elements whose string representation does NOT match the given regular expression. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public SelectableArrayList()
public SelectableArrayList(int initialCapacity)
public SelectableArrayList(Collection<? extends E> collection)
Method Detail |
---|
public SelectableArrayList<E> clone()
clone
in class ArrayList<E>
public SelectableArrayList<E> select(SelectableArrayList.Selector<E> selector)
selector
- the selector to use for matching the elements.
public SelectableArrayList<E> selectMatching(String regularExpression)
regularExpression
- the regular expression to match.
public SelectableArrayList<E> selectMatching(String... regularExpressions)
regularExpressions
- the regular expressions to match using OR.
public SelectableArrayList<E> selectNonMatching(String regularExpression)
regularExpression
- the regular expression to match.
public SelectableArrayList.Selector<E> createOrSelector(SelectableArrayList.Selector<E>... selectors)
selectors
- the selectors that match the actual content.
public SelectableArrayList.Selector<E> createInvertSelector(SelectableArrayList.Selector<E> other)
other
- the selector to invert.
public SelectableArrayList.Selector<E> createRegularExpressionSelector(String regularExpression)
regularExpression
- the regular expression to use for selecting.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |