org.jjoost.collections
Enum MultiSetNesting.Type

java.lang.Object
  extended by java.lang.Enum<MultiSetNesting.Type>
      extended by org.jjoost.collections.MultiSetNesting.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MultiSetNesting.Type>
Enclosing class:
MultiSetNesting<V>

public static enum MultiSetNesting.Type
extends java.lang.Enum<MultiSetNesting.Type>

An enumeration of the nesting types for MultiSet

Author:
b.elliottsmith

Enum Constant Summary
COUNTING
          Store duplicate values merely as an integer against the first such value encountered This is the most efficient means of storing duplicate values.
INLINE
          Store duplicate values "inline" - i.e.
NESTED
          Store duplicate values in a nested set or list.
 
Method Summary
static MultiSetNesting.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MultiSetNesting.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

COUNTING

public static final MultiSetNesting.Type COUNTING
Store duplicate values merely as an integer against the first such value encountered This is the most efficient means of storing duplicate values.


INLINE

public static final MultiSetNesting.Type INLINE
Store duplicate values "inline" - i.e. in the same structure as we would store unique values Typically this will be more efficient than NESTED for very small numbers of duplicates


NESTED

public static final MultiSetNesting.Type NESTED
Store duplicate values in a nested set or list. Typically this will be more efficient than INLINE for moderate to large numbers of duplicates (e.g. above 3 on average)

Method Detail

values

public static MultiSetNesting.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MultiSetNesting.Type c : MultiSetNesting.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MultiSetNesting.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null