simpledb.materialize
Class GroupValue

java.lang.Object
  extended by simpledb.materialize.GroupValue

public class GroupValue
extends Object

An object that holds the values of the grouping fields for the current record of a scan.

Author:
Edward Sciore

Constructor Summary
GroupValue(Scan s, Collection<String> fields)
          Creates a new group value, given the specified scan and list of fields.
 
Method Summary
 boolean equals(Object obj)
          Two GroupValue objects are equal if they have the same values for their grouping fields.
 Constant getVal(String fldname)
          Returns the Constant value of the specified field in the group.
 int hashCode()
          The hashcode of a GroupValue object is the sum of the hashcodes of its field values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupValue

public GroupValue(Scan s,
                  Collection<String> fields)
Creates a new group value, given the specified scan and list of fields. The values in the current record of each field are stored.

Parameters:
s - a scan
fields - the list of fields
Method Detail

getVal

public Constant getVal(String fldname)
Returns the Constant value of the specified field in the group.

Parameters:
fldname - the name of a field
Returns:
the value of the field in the group

equals

public boolean equals(Object obj)
Two GroupValue objects are equal if they have the same values for their grouping fields.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
The hashcode of a GroupValue object is the sum of the hashcodes of its field values.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2011. All Rights Reserved.