Package org.infinispan.protostream
Record Class WrappedMessage.Tag<T>
java.lang.Object
java.lang.Record
org.infinispan.protostream.WrappedMessage.Tag<T>
- All Implemented Interfaces:
WrappedMessage.ValueOrTag<T>
- Enclosing class:
WrappedMessage
private static record WrappedMessage.Tag<T>(int tag)
extends Record
implements WrappedMessage.ValueOrTag<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intgetTag()final inthashCode()Returns a hash code value for this object.booleanhasTag()inttag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.protostream.WrappedMessage.ValueOrTag
getValue, hasValue
-
Field Details
-
tag
private final int tagThe field for thetagrecord component.
-
-
Constructor Details
-
Tag
private Tag(int tag) Creates an instance of aTagrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
hasTag
public boolean hasTag()- Specified by:
hasTagin interfaceWrappedMessage.ValueOrTag<T>
-
getTag
public int getTag()- Specified by:
getTagin interfaceWrappedMessage.ValueOrTag<T>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
tag
public int tag()Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-