|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the types of the elements in the chainpublic interface Chain<T extends ModifiableLink<T>>
A linked list of elements together with helper functions to find, create if not found, and remove elements in the chain.
Matcher| Method Summary | ||
|---|---|---|
|
find(Matcher<T,S> matcher)
Finds the first element in the chain that satisfies the provided Matcher. |
|
|
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. |
|
|
remove(Matcher<T,S> descriptor)
Removes the first element in the chain that satisfies the provided Matcher. |
|
| Methods inherited from interface org.semanticweb.elk.util.collections.chains.ModifiableLink |
|---|
next, setNext |
| Method Detail |
|---|
<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 for
Matcher 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 references
Matcher 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 for
null if not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||