Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.list.engine
Class Grouper

    java.lang.Object
      java.util.Dictionary<K,V>
          java.util.Hashtable
              org.makumba.list.engine.Grouper

All Implemented Interfaces:
  Serializable, Cloneable, Map

    public class Grouper

extends Hashtable

This class groups data coming in an Enumeration of Dictionaries. Grouping is done in more levels, each level is defined by a set of keys of the dictionary. Elements of each group come in a Vector that is guaranteed to respect the order in the original enumeration.

Author:
  Cristian Bogdan
See Also:
  Serialized Form

Field Summary
`(package private) Vector<Vector<Integer>>` | `keyNameSets`
`(package private) MultipleKey[]` | `keyStack`
`(package private) int` | `max`
`(package private) Hashtable[]` | `stack`

Constructor Summary
`Grouper(Vector<Vector<Integer>> keyNameSets, Enumeration e)` Groups the given data according to the given key sets.

Method Summary
`Vector` | `getData(Vector keyData)` Gets the Vector associated with the given keysets.
`protected MultipleKey` | `getKey(int n, Object[] data)` Get the bunch of values associated with the keyset with the given index

Methods inherited from class java.util.Hashtable
`clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### keyNameSets

    Vector<Vector<Integer>> keyNameSets

### max

    int max

### stack

    Hashtable[] stack

### keyStack

    MultipleKey[] keyStack

Constructor Detail

### Grouper

    public Grouper(Vector<Vector<Integer>> keyNameSets,
                   Enumeration e)

  Groups the given data according to the given key sets.

  Parameters:
    `keyNameSets` - a Vector of Vectors of Strings that represents key names
    `e` - the Enumeration of dictionaries containing the data

Method Detail

### getData

    public Vector getData(Vector keyData)

  Gets the Vector associated with the given keysets. The returned data is deleted from the Grouper.

  Parameters:
    `keyData` - a Vector of Dictionaries representing a set of key values each
  Returns:
    A Vector associated with the given keysets

### getKey

    protected MultipleKey getKey(int n,
                                 Object[] data)

  Get the bunch of values associated with the keyset with the given index

  Parameters:
    `n` - the index
    `data` - an object array containing the interesting data
  Returns:
    A MultipleKey holding the values

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20