simpledb
Interface Field

All Known Implementing Classes:
IntField, StringField

public interface Field

Interface for values of fields in tuples in SimpleDB.


Method Summary
 boolean compare(Predicate.Op op, Field value)
          Compare the value of this field object to the passed in value.
 boolean equals(java.lang.Object field)
           
 Type getType()
          Returns the type of this field (see Type.INT_TYPE or Type.STRING_TYPE
 int hashCode()
          Hash code.
 void serialize(java.io.DataOutputStream dos)
          Write the bytes representing this field to the specified DataOutputStream.
 java.lang.String toString()
           
 

Method Detail

serialize

void serialize(java.io.DataOutputStream dos)
               throws java.io.IOException
Write the bytes representing this field to the specified DataOutputStream.

Parameters:
dos - The DataOutputStream to write to.
Throws:
java.io.IOException
See Also:
DataOutputStream

compare

boolean compare(Predicate.Op op,
                Field value)
Compare the value of this field object to the passed in value.

Parameters:
op - The operator
value - The value to compare this Field to
Returns:
Whether or not the comparison yields true.

getType

Type getType()
Returns the type of this field (see Type.INT_TYPE or Type.STRING_TYPE

Returns:
type of this field

hashCode

int hashCode()
Hash code. Different Field objects representing the same value should probably return the same hashCode.

Overrides:
hashCode in class java.lang.Object

equals

boolean equals(java.lang.Object field)
Overrides:
equals in class java.lang.Object

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object