public class StringField extends java.lang.Object implements Field
Modifier and Type | Field and Description |
---|---|
private int |
maxSize |
private static long |
serialVersionUID |
private java.lang.String |
value |
Constructor and Description |
---|
StringField(java.lang.String s,
int maxSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compare(Predicate.Op op,
Field val)
Compare the specified field to the value of this Field.
|
boolean |
equals(java.lang.Object field) |
Type |
getType()
Returns the type of this field (see
Type.INT_TYPE or Type.STRING_TYPE |
java.lang.String |
getValue() |
int |
hashCode()
Hash code.
|
void |
serialize(java.io.DataOutputStream dos)
Write this string to dos.
|
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.String value
private final int maxSize
public StringField(java.lang.String s, int maxSize)
s
- The value of this field.maxSize
- The maximum size of this stringpublic java.lang.String getValue()
public java.lang.String toString()
public int hashCode()
Field
public boolean equals(java.lang.Object field)
public void serialize(java.io.DataOutputStream dos) throws java.io.IOException
public boolean compare(Predicate.Op op, Field val)
compare
in interface Field
op
- The operatorval
- The value to compare this Field toIllegalCastException
- if val is not a StringFieldField.compare(simpledb.Predicate.Op, simpledb.Field)
public Type getType()
Field
Type.INT_TYPE
or Type.STRING_TYPE