|
||||||||||
| 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.AbstractMapStructure<K,V,R>
org.faktorips.runtime.internal.tableindex.KeyStructure<K,V,R>
public class KeyStructure<K,V extends SearchStructure<R> & MergeAndCopyStructure<V>,R>
An implementation of AbstractMapStructure mapping keys to nested SearchStructures much like a map. This structure is useful for values that can be identified by
their key. The generic types are described in AbstractMapStructure.
AbstractMapStructure| Method Summary | ||
|---|---|---|
KeyStructure<K,V,R> |
copy()
This method copies the object which calls it. |
|
static
|
create()
Creates a new empty KeyStructure. |
|
static
|
createWith(K key,
V value)
Creates a new KeyStructure and put the given key value pair. |
|
SearchStructure<R> |
get(Object key)
Returns the nested SearchStructure for the given key. |
|
void |
merge(KeyStructure<K,V,R> map)
Merging adds the contents of the otherMergable to this object. |
|
| Methods inherited from class org.faktorips.runtime.internal.tableindex.AbstractMapStructure |
|---|
emptyResult, fillCopy, get, getMap, getValidResult, merge, put |
| Methods inherited from class org.faktorips.runtime.internal.tableindex.SearchStructure |
|---|
getUnique, getUnique |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <K,V extends SearchStructure<R> & MergeAndCopyStructure<V>,R> KeyStructure<K,V,R> create()
KeyStructure.
public static <K,V extends SearchStructure<R> & MergeAndCopyStructure<V>,R> KeyStructure<K,V,R> createWith(K key,
V value)
KeyStructure and put the given key value pair.
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 void merge(KeyStructure<K,V,R> map)
MergeAndCopyStructureSearchStructure
deletes no content, instead equal values are being merged recursively.
merge in interface MergeAndCopyStructure<KeyStructure<K,V extends SearchStructure<R> & MergeAndCopyStructure<V>,R>>map - The object that should be merged into this objectpublic KeyStructure<K,V,R> copy()
MergeAndCopyStructureMergeAndCopyStructure.copy().
copy in interface MergeAndCopyStructure<KeyStructure<K,V extends SearchStructure<R> & MergeAndCopyStructure<V>,R>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||