net.bytebuddy.matcher.ElementMatcher
to reduce a lists to elements
that are matched by this matcher in this list.
Modifier and Type | Class and Description |
---|---|
public abstract static class | FilterableList.AbstractBase<
The type of the collection's elements. T, The type of this list. S extends FilterableListA base implementation of a |
public static class | FilterableList.Empty<
The type of the collection's elements. T, The type of this list. S extends FilterableListAn implementation of an empty |
Modifier and Type | Method and Description |
---|---|
public S | Returns: A new list only containing the matched elements.The element matcher to match the elements of this list against. elementMatcher)Filters any elements in this lists by the given |
public T | |
public S | subList(int
low endpoint (inclusive) of the subList fromIndex, int high endpoint (exclusive) of the subList toIndex)Redeclares java. fromIndex , inclusive, and toIndex , exclusive.
|
filter | back to summary |
---|---|
public S filter(ElementMatcher<? super T> elementMatcher) Filters any elements in this lists by the given
|
getOnly | back to summary |
---|---|
public T getOnly() Returns the only element of this list. If there is not exactly one element in this list, an
|
subList | back to summary |
---|---|
public S subList(int fromIndex, int toIndex) Redeclares java. Doc from java. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf , and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
|
net.bytebuddy.matcher.FilterableList
.
Modifier and Type | Field and Description |
---|---|
private static final int | ONLY
A convenience variable indicating the index of a list's only variable. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public S | filter(ElementMatcher<? super T>
The element matcher to match the elements of this list against. elementMatcher)Implements net. elementMatcher and returns a list that are matched
by the given matcher.
|
public T | getOnly()
Implements net. |
public S | subList(int
low endpoint (inclusive) of the subList fromIndex, int high endpoint (exclusive) of the subList toIndex)Overrides java. Implements net. fromIndex , inclusive, and toIndex , exclusive.
|
protected abstract S |
ONLY | back to summary |
---|---|
private static final int ONLY A convenience variable indicating the index of a list's only variable. |
AbstractBase | back to summary |
---|---|
public AbstractBase() |
filter | back to summary |
---|---|
public S filter(ElementMatcher<? super T> elementMatcher) Implements net. Doc from net. Filters any elements in this lists by the given
|
getOnly | back to summary |
---|---|
public T getOnly() Implements net. Doc from net. Returns the only element of this list. If there is not exactly one element in this list, an
|
subList | back to summary |
---|---|
public S subList(int fromIndex, int toIndex) Overrides java. Implements net. Doc from net. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf , and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
|
wrap | back to summary |
---|---|
protected abstract S wrap(List<T> values) Represents a list of values as an instance of this instance's list type.
|
net.bytebuddy.matcher.FilterableList
.
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public S | filter(ElementMatcher<? super T>
The element matcher to match the elements of this list against. elementMatcher)Implements net. elementMatcher and returns a list that are matched
by the given matcher.
|
public T | get(int
index of the element to return index)Implements abstract java. Implements java. |
public T | getOnly()
Implements net. |
public int | size()
Implements abstract java. Implements java. |
public S | subList(int
low endpoint (inclusive) of the subList fromIndex, int high endpoint (exclusive) of the subList toIndex)Overrides java. Implements net. fromIndex , inclusive, and toIndex , exclusive.
|
Empty | back to summary |
---|---|
public Empty() |
filter | back to summary |
---|---|
public S filter(ElementMatcher<? super T> elementMatcher) Implements net. Doc from net. Filters any elements in this lists by the given
|
get | back to summary |
---|---|
public T get(int index) Implements abstract java. Implements java. Doc from java. Returns the element at the specified position in this list.
|
getOnly | back to summary |
---|---|
public T getOnly() Implements net. Doc from net. Returns the only element of this list. If there is not exactly one element in this list, an
|
size | back to summary |
---|---|
public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this list. If this list contains
more than
|
subList | back to summary |
---|---|
public S subList(int fromIndex, int toIndex) Overrides java. Implements net. Doc from net. Returns a view of the portion of this list between the specified
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
Similar idioms may be constructed for indexOf and
lastIndexOf , and all of the algorithms in the
Collections class can be applied to a subList.The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
|