Package com.hazelcast.jet.datamodel
Class Tag<T>
java.lang.Object
com.hazelcast.jet.datamodel.Tag<T>
- Type Parameters:
T
- the type of the data associated with the tag
- All Implemented Interfaces:
Serializable
,Comparable<Tag<?>>
A tag object useful as a key in heterogeneous maps. Carries static type
information in its type parameter, which is expected to correspond to
the type of the item retrieved from the map.
Tags are also used by hash-join and co-group builder objects. The same
tag supplied to the builder is used to retrieve the data from the
heterogeneous maps (ItemsByTag
) that appear in the output.
- Since:
- Jet 3.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
int
index()
Returns the index associated with this tag.static <T> Tag<T>
tag
(int index) Returns a tag object associated with the specified index.static <T> Tag<T>
tag0()
Returns the tag constantTAG_0
.static <T> Tag<T>
tag1()
Returns the tag constantTAG_1
.static <T> Tag<T>
tag2()
Returns the tag constantTAG_2
.toString()
-
Method Details
-
tag
Returns a tag object associated with the specified index. The tag's type parameter is inferred from the call site. The method will not necessarily create a new tag object. -
index
public int index()Returns the index associated with this tag. It can refer to the index of a contributing stream in a hash-join or co-group operation, or to the index used internally to store the data associated with the tag. -
tag0
Returns the tag constantTAG_0
. -
tag1
Returns the tag constantTAG_1
. -
tag2
Returns the tag constantTAG_2
. -
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-
toString
-