T - the types of the elements in the chainpublic interface Chain<T extends ModifiableLink<T>> extends ModifiableLink<T>
Matcher| Modifier and Type | Method and Description |
|---|---|
<S extends T> |
find(Matcher<T,S> matcher)
Finds the first element in the chain that satisfies the provided
Matcher. |
<S extends T> |
getCreate(Matcher<T,S> matcher,
ReferenceFactory<T,S> factory)
Finds an element in the chain satisfies the provided
Matcher, or
if no such element is found, creates a new element using the provided
ReferenceFactory and inserts it into the chain. |
<S extends T> |
remove(Matcher<T,S> descriptor)
Removes the first element in the chain that satisfies the provided
Matcher. |
next, setNext<S extends T> S find(Matcher<T,S> matcher)
Matcher. This function does not modify the chain. If the chain is
modified during calling of this function, the behavior of the function is
not specified.matcher - the object describing an element to search forMatcher or null if no such element is found<S extends T> S getCreate(Matcher<T,S> matcher, ReferenceFactory<T,S> factory)
Matcher, or
if no such element is found, creates a new element using the provided
ReferenceFactory and inserts it into the chain. In the letter
case, the chain is modified.matcher - the object describing the element to search forfactory - the factory for creating referencesMatcher if found
in the chain, or the newly created and inserted element object
otherwise<S extends T> S remove(Matcher<T,S> descriptor)
Matcher. If such element is found, the chain is modified.descriptor - the object describing the element to search fornull if not foundCopyright © 2011-2015 Department of Computer Science, University of Oxford. All Rights Reserved.