Package org.apache.wayang.basic.data
Class Record
- java.lang.Object
-
- org.apache.wayang.basic.data.Record
-
public class Record extends java.lang.Object implements java.io.Serializable, Copyable<Record>
A Type that represents a record with a schema, might be replaced with something standard like JPA entity.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Record(java.lang.Object... values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Recordcopy()Create a (potentially shallow) copy of this instance.booleanequals(java.lang.Object o)doublegetDouble(int index)Retrieve a field as adouble.java.lang.ObjectgetField(int index)intgetInt(int index)Retrieve a field as aint.longgetLong(int index)Retrieve a field as along.java.lang.StringgetString(int index)Retrieve a field as aString.inthashCode()intsize()Retrieve the size of this instance.java.lang.StringtoString()
-
-
-
Method Detail
-
copy
public Record copy()
Description copied from interface:CopyableCreate a (potentially shallow) copy of this instance.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getField
public java.lang.Object getField(int index)
-
getDouble
public double getDouble(int index)
Retrieve a field as adouble. It must be castable as such.- Parameters:
index- the index of the field- Returns:
- the
doublerepresentation of the field
-
getLong
public long getLong(int index)
Retrieve a field as along. It must be castable as such.- Parameters:
index- the index of the field- Returns:
- the
longrepresentation of the field
-
getInt
public int getInt(int index)
Retrieve a field as aint. It must be castable as such.- Parameters:
index- the index of the field- Returns:
- the
intrepresentation of the field
-
getString
public java.lang.String getString(int index)
Retrieve a field as aString.- Parameters:
index- the index of the field- Returns:
- the field as a
String(obtained viaObject.toString()) ornullif the field isnull
-
size
public int size()
Retrieve the size of this instance.- Returns:
- the number of fields in this instance
-
-