Class LongShortLongTuple
- All Implemented Interfaces:
StreamingExternalizable,CanonicalizableTuple<LongShortLongTuple>,Externalizable,Serializable,Comparable<LongShortLongTuple>
3-Tuple (triple) key class composed of long, short, and long elements.
Generated by TupleCodeGenerator.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPublic no-arg constructor forExternalizablesupport only.LongShortLongTuple(long element1, short element2, long element3) -
Method Summary
Modifier and TypeMethodDescriptioncanonicalize(UnaryOperator<Object> canonicalizer) Canonicalize this tuple.final intcompareTo(LongShortLongTuple other) final booleanfinal longfinal shortfinal longfinal inthashCode()voidvoidreadExternalStreaming(ObjectInput in, gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders) Alternative toExternalizable.readExternal(ObjectInput)for use when a series of tuples of the same type with the same element types are being read in iterative fashion.toString()voidvoidwriteExternalStreaming(ObjectOutput out, gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters) Alternative toExternalizable.writeExternal(ObjectOutput)for use when a series of tuples of the same type with the same element types are being written in iterative fashion.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.illumon.iris.db.util.serialization.StreamingExternalizable
initializeExternalStreaming
-
Constructor Details
-
LongShortLongTuple
public LongShortLongTuple(long element1, short element2, long element3) -
LongShortLongTuple
public LongShortLongTuple()Public no-arg constructor forExternalizablesupport only. Application code should not use this!
-
-
Method Details
-
getFirstElement
public final long getFirstElement() -
getSecondElement
public final short getSecondElement() -
getThirdElement
public final long getThirdElement() -
hashCode
public final int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<LongShortLongTuple>
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternalStreaming
public void writeExternalStreaming(@NotNull ObjectOutput out, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters) throws IOException Description copied from interface:StreamingExternalizableAlternative to
Externalizable.writeExternal(ObjectOutput)for use when a series of tuples of the same type with the same element types are being written in iterative fashion.Primitive elements should be written with their primitive write methods (e.g.
DataOutput.writeInt(int)).Object elements are preceded by a boolean, true if null, false otherwise. The first non-null value for a given Object element is then preceded by the name of the class. All non-null values are then written with a writer method from
SerializationUtils.getWriter(Class, ObjectOutput), cached in cachedWriters.- Specified by:
writeExternalStreamingin interfaceStreamingExternalizable- Parameters:
out- The outputcachedWriters- The cached writers- Throws:
IOException
-
readExternalStreaming
public void readExternalStreaming(@NotNull ObjectInput in, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders) throws Exception Description copied from interface:StreamingExternalizableAlternative to
Externalizable.readExternal(ObjectInput)for use when a series of tuples of the same type with the same element types are being read in iterative fashion.Primitive elements should be read with their primitive read methods (e.g.
DataInput.readInt()).Object elements are preceded by a boolean, true if null, false otherwise. The first non-null value for a given Object element is then preceded by the name of the class. All non-null values are then read with a reader method from
SerializationUtils.getReader(Class, ObjectInput), cached in cachedReaders.- Specified by:
readExternalStreamingin interfaceStreamingExternalizable- Parameters:
in- The inputcachedReaders- The cached readers- Throws:
Exception
-
toString
-
canonicalize
Description copied from interface:CanonicalizableTupleCanonicalize this tuple.- Specified by:
canonicalizein interfaceCanonicalizableTuple<LongShortLongTuple>- Parameters:
canonicalizer- The canonicalization operator to use on each object element.- Returns:
- This tuple if already canonical, else a new, canonical tuple of the same type
-