|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectsimpledb.StringField
public class StringField
Instance of Field that stores a single String of a fixed length.
| Field Summary | |
|---|---|
private int |
maxSize
|
private java.lang.String |
value
|
| Constructor Summary | |
|---|---|
StringField(java.lang.String s,
int maxSize)
Constructor. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String value
private int maxSize
| Constructor Detail |
|---|
public StringField(java.lang.String s,
int maxSize)
s - The value of this field.maxSize - The maximum size of this string| Method Detail |
|---|
public java.lang.String getValue()
public java.lang.String toString()
toString in interface FieldtoString in class java.lang.Objectpublic int hashCode()
Field
hashCode in interface FieldhashCode in class java.lang.Objectpublic boolean equals(java.lang.Object field)
equals in interface Fieldequals in class java.lang.Object
public void serialize(java.io.DataOutputStream dos)
throws java.io.IOException
serialize in interface Fielddos - Where the string is written
java.io.IOExceptionDataOutputStream
public boolean compare(Predicate.Op op,
Field val)
compare in interface Fieldop - The operatorval - The value to compare this Field to
IllegalCastException - if val is not a StringFieldField.compare(simpledb.Predicate.Op, simpledb.Field)public Type getType()
FieldType.INT_TYPE or Type.STRING_TYPE
getType in interface Field
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||