|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.tuple.TupleEntry
public class TupleEntry
Class TupleEntry allows a Tuple
instance and its declaring Fields
instance to be used as a single object.
Fields
,
Tuple
Field Summary | |
---|---|
static TupleEntry |
NULL
|
Constructor Summary | |
---|---|
TupleEntry()
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(boolean isUnmodifiable)
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(Fields fields)
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(Fields fields,
boolean isUnmodifiable)
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(Fields fields,
Tuple tuple)
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(Tuple tuple)
Constructor TupleEntry creates a new TupleEntry instance. |
|
TupleEntry(TupleEntry tupleEntry)
Constructor TupleEntry creates a new TupleEntry instance that is a safe copy of the given tupleEntry. |
Method Summary | |
---|---|
TupleEntry |
appendNew(TupleEntry entry)
Method appendNew appends the given TupleEntry instance to this instance. |
boolean |
equals(Object object)
|
Comparable |
get(Comparable fieldName)
Deprecated. |
Comparable |
get(int pos)
Deprecated. |
boolean |
getBoolean(Comparable fieldName)
Method getBoolean returns the element for the given field name or position as a boolean. |
double |
getDouble(Comparable fieldName)
Method getDouble returns the element for the given field name or position as a double. |
Fields |
getFields()
Method getFields returns the fields of this TupleEntry object. |
float |
getFloat(Comparable fieldName)
Method getFloat returns the element for the given field name or position as a float. |
int |
getInteger(Comparable fieldName)
Method getInteger returns the element for the given field name or position as an int. |
long |
getLong(Comparable fieldName)
Method getLong returns the element for the given field name or position as a long. |
Object |
getObject(Comparable fieldName)
Method get returns the value in the given field or position. |
Object |
getObject(int pos)
Method get returns the value in the given position pos. |
short |
getShort(Comparable fieldName)
Method getShort returns the element for the given field name or position as a short. |
String |
getString(Comparable fieldName)
Method getString returns the element for the given field name or position as a String. |
Tuple |
getTuple()
Method getTuple returns the tuple of this TupleEntry object. |
Tuple |
getTupleCopy()
Method getTupleCopy returns a copy of the tuple of this TupleEntry object. |
int |
hashCode()
|
boolean |
isUnmodifiable()
Method isUnmodifiable returns true if this TupleEntry is unmodifiable. |
static Tuple |
select(Fields selector,
TupleEntry... entries)
Method select will select a new Tuple instance from the given set of entries. |
TupleEntry |
selectEntry(Fields selector)
Method selectEntry selects the fields specified in selector from this instance. |
Tuple |
selectTuple(Fields selector)
Method selectTuple selects the fields specified in selector from this instance. |
void |
set(Comparable fieldName,
Object value)
Method set sets the value in the given field or position. |
void |
set(TupleEntry tupleEntry)
Method set sets the values from the given tupleEntry into this TupleEntry instance based on the given tupleEntry field names. |
void |
setBoolean(Comparable fieldName,
boolean value)
Method setBoolean sets the value in the given field or position. |
void |
setDouble(Comparable fieldName,
double value)
Method setDouble sets the value in the given field or position. |
void |
setFloat(Comparable fieldName,
float value)
Method setFloat sets the value in the given field or position. |
void |
setInteger(Comparable fieldName,
int value)
Method setInteger sets the value in the given field or position. |
void |
setLong(Comparable fieldName,
long value)
Method setLong sets the value in the given field or position. |
void |
setShort(Comparable fieldName,
short value)
Method setShort sets the value in the given field or position. |
void |
setString(Comparable fieldName,
String value)
Method setString sets the value in the given field or position. |
void |
setTuple(Fields selector,
Tuple tuple)
Method setTuple sets the values specified by the selector to the values given by the given tuple. |
void |
setTuple(Tuple tuple)
Method setTuple sets the tuple of this TupleEntry object. |
int |
size()
Method size returns the number of values in this instance. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final TupleEntry NULL
Constructor Detail |
---|
public TupleEntry()
@ConstructorProperties(value="isUnmodifiable") public TupleEntry(boolean isUnmodifiable)
isUnmodifiable
- of type boolean@ConstructorProperties(value="fields") public TupleEntry(Fields fields)
fields
- of type Fields@ConstructorProperties(value={"fields","isUnmodifiable"}) public TupleEntry(Fields fields, boolean isUnmodifiable)
fields
- of type FieldsisUnmodifiable
- of type boolean@ConstructorProperties(value={"fields","tuple"}) public TupleEntry(Fields fields, Tuple tuple)
fields
- of type Fieldstuple
- of type Tuple@ConstructorProperties(value="tupleEntry") public TupleEntry(TupleEntry tupleEntry)
tupleEntry
- of type TupleEntry@ConstructorProperties(value="tuple") public TupleEntry(Tuple tuple)
tuple
- of type TupleMethod Detail |
---|
public static Tuple select(Fields selector, TupleEntry... entries)
selector
- of type Fieldsentries
- of type TupleEntry
public boolean isUnmodifiable()
public Fields getFields()
public Tuple getTuple()
public Tuple getTupleCopy()
public void setTuple(Tuple tuple)
tuple
- the tuple of this TupleEntry object.public int size()
@Deprecated public Comparable get(int pos)
getObject(int)
instead.
pos
- position of the element to return.
public Object getObject(int pos)
pos
- position of the element to return.
@Deprecated public Comparable get(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
This method is deprecated, use getObject(Comparable)
instead.
fieldName
- field name or position to return
public Object getObject(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public void set(Comparable fieldName, Object value)
fieldName
- field name or position to setvalue
- of type Comparablepublic void setBoolean(Comparable fieldName, boolean value)
fieldName
- field name or position to setvalue
- of type booleanpublic void setShort(Comparable fieldName, short value)
fieldName
- field name or position to setvalue
- of type shortpublic void setInteger(Comparable fieldName, int value)
fieldName
- field name or position to setvalue
- of type intpublic void setLong(Comparable fieldName, long value)
fieldName
- field name or position to setvalue
- of type longpublic void setFloat(Comparable fieldName, float value)
fieldName
- field name or position to setvalue
- of type floatpublic void setDouble(Comparable fieldName, double value)
fieldName
- field name or position to setvalue
- of type doublepublic void setString(Comparable fieldName, String value)
fieldName
- field name or position to setvalue
- of type Stringpublic String getString(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public float getFloat(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public double getDouble(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public int getInteger(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public long getLong(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public short getShort(Comparable fieldName)
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public boolean getBoolean(Comparable fieldName)
true
value will be returned. false
if null.
fieldName
may optionally be a Fields
instance. Only the first field name or position will
be considered.
fieldName
- field name or position to return
public TupleEntry selectEntry(Fields selector)
selector
- Fields selector that selects the values to return
public Tuple selectTuple(Fields selector)
selector
- Fields selector that selects the values to return
public void setTuple(Fields selector, Tuple tuple)
selector
- of type Fieldstuple
- of type Tuplepublic void set(TupleEntry tupleEntry)
tupleEntry
- of type TupleEntrypublic TupleEntry appendNew(TupleEntry entry)
entry
- of type TupleEntry
public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |