|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.tableindex.SearchStructure<R>
org.faktorips.runtime.internal.tableindex.ResultStructure<R>
public class ResultStructure<R>
ResultStructures are the leaves in the tree of nested
SearchStructures. Each ResultStructure defines a result of a
search and thus holds a set of values. It also implements the MergeAndCopyStructure
interface to be able to combine the values of two result structures.
| Method Summary | ||
|---|---|---|
ResultStructure<R> |
copy()
This method copies the object which calls it. |
|
static
|
createWith(R resultValue)
Creates a new ResultSet with the given resultValue as its only result value. |
|
static
|
createWith(Set<R> resultValues)
Creates a new ResultSet with the given set of result values. |
|
boolean |
equals(Object obj)
|
|
Set<R> |
get()
Returns the set of resulting values. |
|
SearchStructure<R> |
get(Object key)
Returns the nested SearchStructure for the given key. |
|
int |
hashCode()
|
|
void |
merge(ResultStructure<R> otherStructure)
Merging adds the contents of the otherMergable to this object. |
|
String |
toString()
|
|
| Methods inherited from class org.faktorips.runtime.internal.tableindex.SearchStructure |
|---|
getUnique, getUnique |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <R> ResultStructure<R> createWith(R resultValue)
ResultSet with the given resultValue as its only result value.
public static <R> ResultStructure<R> createWith(Set<R> resultValues)
ResultSet with the given set of result values.
public SearchStructure<R> get(Object key)
SearchStructureSearchStructure for the given key. This method never returns
null. If no value exists for a given key an EmptySearchStructure is
returned as a fall-back.
get in class SearchStructure<R>key - The key for the requested nested SearchStructure
SearchStructure or an EmptySearchStructure if the key does
not exist.public Set<R> get()
SearchStructureSearchStructure is no
ResultStructure this method simply aggregates every nested structures' results. Beware that the aggregation of nested elements has linear complexity.
get in class SearchStructure<R>SearchStructurepublic void merge(ResultStructure<R> otherStructure)
MergeAndCopyStructureSearchStructure
deletes no content, instead equal values are being merged recursively.
merge in interface MergeAndCopyStructure<ResultStructure<R>>otherStructure - The object that should be merged into this objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic ResultStructure<R> copy()
MergeAndCopyStructureMergeAndCopyStructure.copy().
copy in interface MergeAndCopyStructure<ResultStructure<R>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||