- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathField.java
More file actions
Latest commit
40 lines (34 loc) · 1.06 KB
/
Copy pathField.java
File metadata and controls
40 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
packagesimpledb;
importjava.io.*;
/**
* Interface for values of fields in tuples in SimpleDB.
*/
publicinterfaceField {
/**
* Write the bytes representing this field to the specified
* DataOutputStream.
* @see DataOutputStream
* @param dos The DataOutputStream to write to.
*/
voidserialize(DataOutputStreamdos) throwsIOException;
/**
* Compare the value of this field object to the passed in value.
* @param op The operator
* @param value The value to compare this Field to
* @return Whether or not the comparison yields true.
*/
publicbooleancompare(Predicate.Opop, Fieldvalue);
/**
* Returns the type of this field (see {@link Type#INT_TYPE} or {@link Type#STRING_TYPE}
* @return type of this field
*/
publicTypegetType();
/**
* Hash code.
* Different Field objects representing the same value should probably
* return the same hashCode.
*/
publicinthashCode();
publicbooleanequals(Objectfield);
publicStringtoString();
}