|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.collections.MultiMapNesting<V>
public class MultiMapNesting<V>
This class encapsulates the concept of nesting for objects that implement MultiMap.
Two kinds of nesting are supported: INLINE and NESTED. INLINE
indicates that the map should be structurally the same as if it did not support duplicates,
only that duplicate records are handled correctly. i.e. an INLINE MultiMap that
contains no duplicate keys should look structurally identical to a regular Map.
A NESTED MultiMap, however, should store a Set against every
single key. If NESTED, a MultiMapNesting requires a Factory
in order to produce each MultiSet we store against each key.
| Nested Class Summary | |
|---|---|
static class |
MultiMapNesting.Type
An enumeration of the nesting types for MultiMap |
| Method Summary | ||
|---|---|---|
Factory<Set<V>> |
factory()
Factory; ignored if type() == INLINE |
|
static
|
inline()
Public method for retrieving the MultiMapNesting that represents INLINE nesting |
|
static
|
nested(Factory<Set<V>> factory)
Public method for retrieving a MultiMapNesting to represent the required NESTED nesting |
|
static
|
nestedHash()
Return a MultiMapNesting of type NESTED, that uses hash sets for the nesting |
|
MultiMapNesting.Type |
type()
INLINE or NESTED |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public MultiMapNesting.Type type()
public Factory<Set<V>> factory()
public static <V> MultiMapNesting<V> inline()
MultiMapNesting that represents INLINE nesting
public static <V> MultiMapNesting<V> nested(Factory<Set<V>> factory)
MultiMapNesting to represent the required NESTED nesting
factory - the factory
public static <V> MultiMapNesting<V> nestedHash()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||