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:
java.io.Serializable
,java.lang.Comparable<Tag<?>>
public final class Tag<T> extends java.lang.Object implements java.lang.Comparable<Tag<?>>, java.io.Serializable
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Tag<?> that)
boolean
equals(java.lang.Object obj)
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
.java.lang.String
toString()
-
-
-
Method Detail
-
tag
public static <T> Tag<T> tag(int index)
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.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(Tag<?> that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<T>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-