public final class PrimitiveDimensionType extends DimensionType
| Modifier and Type | Field and Description |
|---|---|
static PrimitiveDimensionType |
BOOLEAN |
static PrimitiveDimensionType |
BYTES |
static PrimitiveDimensionType |
INT |
static PrimitiveDimensionType |
LONG |
static PrimitiveDimensionType |
STRING |
DUMMY_NAME, OUT_OF_VOCAB, UNKNOWN_SHAPE| Constructor and Description |
|---|
PrimitiveDimensionType(Primitive primitive) |
PrimitiveDimensionType(Primitive primitive,
int shape) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName()
Get the name of the DimensionType
|
Primitive |
getRepresentation() |
int |
getShape()
Get the shape.
|
int |
hashCode() |
void |
setDimensionValue(WriteableTuple target,
int column,
java.lang.Object dimensionValue)
Sets a dimension in a particular column of a target tuple.
|
java.lang.String |
toString() |
PrimitiveDimensionType |
withShape(int shape) |
getDimensionValue, indexToString, stringToIndexpublic static final PrimitiveDimensionType LONG
public static final PrimitiveDimensionType INT
public static final PrimitiveDimensionType STRING
public static final PrimitiveDimensionType BOOLEAN
public static final PrimitiveDimensionType BYTES
public PrimitiveDimensionType(Primitive primitive, int shape)
public PrimitiveDimensionType(Primitive primitive)
public PrimitiveDimensionType withShape(int shape)
shape - the shape of the new type.public int getShape()
DimensionTypegetShape in class DimensionTypepublic Primitive getRepresentation()
public java.lang.String getName()
DimensionTypegetName in class DimensionTypepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void setDimensionValue(WriteableTuple target, int column, java.lang.Object dimensionValue)
DimensionTypesetDimensionValue in class DimensionTypetarget - the destination where the dimension value should be set. Hint: This will often be a com.linkedin.feathr.common.TensorBuildercolumn - the column number of the target tuple to be setdimensionValue - the value of the dimensionpublic java.lang.String toString()
toString in class java.lang.Object