Package com.apple.foundationdb.tuple
Class Tuple
- java.lang.Object
-
- com.apple.foundationdb.tuple.Tuple
-
- All Implemented Interfaces:
java.lang.Comparable<Tuple>,java.lang.Iterable<java.lang.Object>
public class Tuple extends java.lang.Object implements java.lang.Comparable<Tuple>, java.lang.Iterable<java.lang.Object>
Represents a set of elements that make up a sortable, typed key. This object is comparable with otherTuples and will sort in Java in the same order in which they would sort in FoundationDB.Tuples sort first by the first element, then by the second, etc. This makes the tuple layer ideal for building a variety of higher-level data models.
Types
ATuplecan contain byte arrays (byte[]),Strings,Numbers,UUIDs,booleans,Lists,Versionstamps, otherTuples, andnull.FloatandDoubleinstances will be serialized as single- and double-precision numbers respectively, andBigIntegers within the range [-2^2040+1,2^2040-1] are serialized without loss of precision (those outside the range will raise anIllegalArgumentException). All otherNumbers will be converted to alongintegral value, so the range will be constrained to [-2^63,2^63-1]. Note that for numbers outside this range the way that Java truncates integral values may yield unexpected results.
The FoundationDB tuple specification has a special type-code fornullvaluesNone;nil; or, as Java would understand it,null. The behavior of the layer in the presence ofnullvaries by type with the intention of matching expected behavior in Java.byte[],Strings,UUIDs, and nestedLists andTuples can benull, whereas numbers (e.g.,longs anddoubles) and booleans cannot. This means that the typed getters (getBytes(),getString()),getUUID(),getNestedTuple(),getVersionstamp, andgetNestedList()) will returnnullif the entry at that location wasnulland the typed adds (add(byte[]),add(String),add(Versionstamp)add(Tuple), andadd(List)) will acceptnull. Thetyped get for integersand other typed getters, however, will throw aNullPointerExceptionif the entry in theTuplewasnullat that position.
This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description Tuple()Construct a new emptyTuple.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tupleadd(boolean b)Creates a copy of thisTuplewith abooleanappended as the last element.Tupleadd(byte[] b)Creates a copy of thisTuplewith abytearray appended as the last element.Tupleadd(byte[] b, int offset, int length)Creates a copy of thisTuplewith abytearray appended as the last element.Tupleadd(double d)Creates a copy of thisTuplewith adoubleappended as the last element.Tupleadd(float f)Creates a copy of thisTuplewith afloatappended as the last element.Tupleadd(long l)Creates a copy of thisTuplewith alongappended as the last element.Tupleadd(Tuple t)Creates a copy of thisTuplewith aTupleappended as the last element.Tupleadd(Versionstamp v)Creates a copy of thisTuplewith aVersionstampobject appended as the last element.Tupleadd(java.lang.String s)Creates a copy of thisTuplewith aStringappended as the last element.Tupleadd(java.math.BigInteger bi)Creates a copy of thisTuplewith aBigIntegerappended as the last element.Tupleadd(java.util.List<?> l)Creates a copy of thisTuplewith aListappended as the last element.Tupleadd(java.util.UUID uuid)Creates a copy of thisTuplewith aUUIDappended as the last element.TupleaddAll(Tuple other)Create a copy of thisTuplewith all elements from antherTupleappended.TupleaddAll(java.util.List<?> o)Create a copy of thisTuplewith a list of items appended.TupleaddObject(java.lang.Object o)Creates a copy of thisTuplewith an appended last element.intcompareTo(Tuple t)Compare the byte-array representation of thisTupleagainst another.booleanequals(java.lang.Object o)Tests for equality with anotherTuple.static Tuplefrom(java.lang.Object... items)Creates a newTuplefrom a variable number of elements.static TuplefromBytes(byte[] bytes)Construct a newTuplewith elements decoded from a suppliedbytearray.static TuplefromBytes(byte[] bytes, int offset, int length)Construct a newTuplewith elements decoded from a suppliedbytearray.static TuplefromItems(java.lang.Iterable<?> items)Creates a newTuplefrom a variable number of elements.static TuplefromList(java.util.List<?> items)Efficiently creates a newTuplefrom a list of objects.static TuplefromStream(java.util.stream.Stream<?> items)Efficiently creates a newTuplefrom aStreamof objects.java.lang.Objectget(int index)Gets an indexed item without forcing a type.java.math.BigIntegergetBigInteger(int index)Gets an indexed item as aBigInteger.booleangetBoolean(int index)Gets an indexed item as aboolean.byte[]getBytes(int index)Gets an indexed item as abyte[].doublegetDouble(int index)Gets an indexed item as adouble.floatgetFloat(int index)Gets an indexed item as afloat.java.util.List<java.lang.Object>getItems()Gets the unserialized contents of thisTuple.longgetLong(int index)Gets an indexed item as along.java.util.List<java.lang.Object>getNestedList(int index)Gets an indexed item as aList.TuplegetNestedTuple(int index)Gets an indexed item as aTuple.intgetPackedSize()Get the number of bytes in the packed representation of thisTuple.java.lang.StringgetString(int index)Gets an indexed item as aString.java.util.UUIDgetUUID(int index)Gets an indexed item as aUUID.VersionstampgetVersionstamp(int index)Gets an indexed item as aVersionstamp.inthashCode()Returns a hash code value for thisTuple.booleanhasIncompleteVersionstamp()Determines if there is aVersionstampincluded in thisTuplethat has not had its transaction version set.booleanisEmpty()Determine if thisTuplecontains no elements.java.util.Iterator<java.lang.Object>iterator()Gets anIteratorover theObjectsin thisTuple.byte[]pack()Get an encoded representation of thisTuple.byte[]pack(byte[] prefix)Get an encoded representation of thisTuple.voidpackInto(java.nio.ByteBuffer dest)Pack an encoded representation of thisTupleonto the end of the givenByteBuffer.byte[]packWithVersionstamp()Get an encoded representation of thisTuplefor use withMutationType.SET_VERSIONSTAMPED_KEY.byte[]packWithVersionstamp(byte[] prefix)Get an encoded representation of thisTuplefor use withMutationType.SET_VERSIONSTAMPED_KEY.TuplepopBack()Creates a newTuplewith the last item of thisTupleremoved.TuplepopFront()Creates a newTuplewith the first item of thisTupleremoved.Rangerange()Returns a range representing all keys that encodeTuples strictly starting with thisTuple.Rangerange(byte[] prefix)Returns a range representing all keys that encodeTuples strictly starting with the given prefix followed by thisTuple.intsize()Gets the number of elements in thisTuple.java.util.stream.Stream<java.lang.Object>stream()Gets aStreamof the unserialized contents of thisTuple.java.lang.StringtoString()Returns a string representing thisTuple.
-
-
-
Constructor Detail
-
Tuple
public Tuple()
Construct a new emptyTuple. After creation, items can be added with calls to the variations ofadd().- See Also:
from(Object...),fromBytes(byte[]),fromItems(Iterable)
-
-
Method Detail
-
addObject
public Tuple addObject(java.lang.Object o)
Creates a copy of thisTuplewith an appended last element. The parameter is untyped but onlyString,byte[],Numbers,UUIDs,Booleans,Lists,Tuples, andnullare allowed. If an object of another type is passed, then anIllegalArgumentExceptionis thrown.- Parameters:
o- the object to append. Must beString,byte[],Numbers,UUID,List,Boolean, ornull.- Returns:
- a newly created
Tuple
-
add
public Tuple add(java.lang.String s)
Creates a copy of thisTuplewith aStringappended as the last element.- Parameters:
s- theStringto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(long l)
Creates a copy of thisTuplewith alongappended as the last element.- Parameters:
l- the number to append- Returns:
- a newly created
Tuple
-
add
public Tuple add(byte[] b)
Creates a copy of thisTuplewith abytearray appended as the last element.- Parameters:
b- thebytes to append- Returns:
- a newly created
Tuple
-
add
public Tuple add(boolean b)
Creates a copy of thisTuplewith abooleanappended as the last element.- Parameters:
b- thebooleanto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(java.util.UUID uuid)
Creates a copy of thisTuplewith aUUIDappended as the last element.- Parameters:
uuid- theUUIDto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(java.math.BigInteger bi)
Creates a copy of thisTuplewith aBigIntegerappended as the last element. AsTuples cannot containnullnumeric types, aNullPointerExceptionis raised if anullargument is passed.- Parameters:
bi- theBigIntegerto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(float f)
Creates a copy of thisTuplewith afloatappended as the last element.- Parameters:
f- thefloatto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(double d)
Creates a copy of thisTuplewith adoubleappended as the last element.- Parameters:
d- thedoubleto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(Versionstamp v)
Creates a copy of thisTuplewith aVersionstampobject appended as the last element.- Parameters:
v- theVersionstampto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(java.util.List<?> l)
Creates a copy of thisTuplewith aListappended as the last element. This does not add the elements individually (for that, useTuple.addAll). This adds the list as a single element nested within the outerTuple.- Parameters:
l- theListto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(Tuple t)
Creates a copy of thisTuplewith aTupleappended as the last element. This does not add the elements individually (for that, useTuple.addAll). This adds the list as a single element nested within the outerTuple.- Parameters:
t- theTupleto append- Returns:
- a newly created
Tuple
-
add
public Tuple add(byte[] b, int offset, int length)
Creates a copy of thisTuplewith abytearray appended as the last element.- Parameters:
b- thebytes to appendoffset- the starting index ofbto addlength- the number of elements ofbto copy into thisTuple- Returns:
- a newly created
Tuple
-
addAll
public Tuple addAll(java.util.List<?> o)
Create a copy of thisTuplewith a list of items appended.- Parameters:
o- the list of objects to append. Elements must beString,byte[],Numbers, ornull.- Returns:
- a newly created
Tuple
-
addAll
public Tuple addAll(Tuple other)
Create a copy of thisTuplewith all elements from antherTupleappended.- Parameters:
other- theTuplewhose elements should be appended- Returns:
- a newly created
Tuple
-
pack
public byte[] pack()
Get an encoded representation of thisTuple. Each element is encoded tobytes and concatenated. Note that once aTuplehas been packed, its serialized representation is stored internally so that future calls to this function are faster than the initial call.- Returns:
- a packed representation of this
Tuple
-
pack
public byte[] pack(byte[] prefix)
Get an encoded representation of thisTuple. Each element is encoded tobytes and concatenated, and then the prefix supplied is prepended to the array. Note that once aTuplehas been packed, its serialized representation is stored internally so that future calls to this function are faster than the initial call.- Parameters:
prefix- additional byte-array prefix to prepend to the packed bytes- Returns:
- a packed representation of this
Tupleprepended by theprefix
-
packInto
public void packInto(java.nio.ByteBuffer dest)
Pack an encoded representation of thisTupleonto the end of the givenByteBuffer. It is up to the caller to ensure that there is enough space allocated within the buffer to avoidBufferOverflowExceptions. The client may callgetPackedSize()to determine how large thisTuplewill be once packed in order to allocate sufficient memory. Note that unlikepack(), the serialized representation of thisTupleis not stored, so calling this function multiple times with the sameTuplerequires serializing theTuplemultiple times.
This method will throw an error if there are any incompleteVersionstamps in thisTuple.- Parameters:
dest- the destinationByteBufferfor the encodedTuple
-
packWithVersionstamp
public byte[] packWithVersionstamp()
Get an encoded representation of thisTuplefor use withMutationType.SET_VERSIONSTAMPED_KEY. This works the same as theone-paramter version of this method, but it does not add any prefix to the array.- Returns:
- a packed representation of this
Tuplefor use with versionstamp ops. - Throws:
java.lang.IllegalArgumentException- if there is not exactly one incompleteVersionstampincluded in thisTuple
-
packWithVersionstamp
public byte[] packWithVersionstamp(byte[] prefix)
Get an encoded representation of thisTuplefor use withMutationType.SET_VERSIONSTAMPED_KEY. There must be exactly one incompleteVersionstampinstance within thisTupleor this will throw anIllegalArgumentException. Each element is encoded tobytes and concatenated, the prefix is then prepended to the array, and then the index of the packed incompleteVersionstampis appended as a little-endian integer. This can then be passed as the key toTransaction.mutate()with theSET_VERSIONSTAMPED_KEYMutationType, and the transaction's version will then be filled in at commit time.
Note that once aTuplehas been packed, its serialized representation is stored internally so that future calls to this function are faster than the initial call.- Parameters:
prefix- additional byte-array prefix to prepend to packed bytes.- Returns:
- a packed representation of this
Tuplefor use with versionstamp ops. - Throws:
java.lang.IllegalArgumentException- if there is not exactly one incompleteVersionstampincluded in thisTuple
-
getItems
public java.util.List<java.lang.Object> getItems()
Gets the unserialized contents of thisTuple.- Returns:
- the elements that make up this
Tuple.
-
stream
public java.util.stream.Stream<java.lang.Object> stream()
Gets aStreamof the unserialized contents of thisTuple.- Returns:
- a
Streamof the elements that make up thisTuple.
-
iterator
public java.util.Iterator<java.lang.Object> iterator()
Gets anIteratorover theObjectsin thisTuple. ThisIteratoris unmodifiable and will throw an exception ifremove()is called.- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Object>- Returns:
- an unmodifiable
Iteratorover the elements in theTuple.
-
fromBytes
public static Tuple fromBytes(byte[] bytes)
Construct a newTuplewith elements decoded from a suppliedbytearray. The passed byte array must not benull. This will throw an exception if the passed byte array does not represent a validTuple. For example, this will throw an error if it encounters an unknown type code or if there is a packed element that appears to be truncated.- Parameters:
bytes- encodedTuplesource- Returns:
- a new
Tupleconstructed by deserializing the providedbytearray - Throws:
java.lang.IllegalArgumentException- ifbytesdoes not represent a validTuple
-
fromBytes
public static Tuple fromBytes(byte[] bytes, int offset, int length)
Construct a newTuplewith elements decoded from a suppliedbytearray. The passed byte array must not benull. This will throw an exception if the specified slice of the passed byte array does not represent a validTuple. For example, this will throw an error if it encounters an unknown type code or if there is a packed element that appears to be truncated.- Parameters:
bytes- encodedTuplesourceoffset- starting offset of byte array of encoded datalength- length of encoded data within the source- Returns:
- a new
Tupleconstructed by deserializing the specified slice of the providedbytearray - Throws:
java.lang.IllegalArgumentException- ifoffsetorlengthare negative or would exceed the size of the array or ifbytesdoes not represent a validTuple
-
size
public int size()
Gets the number of elements in thisTuple.- Returns:
- the number of elements in this
Tuple
-
isEmpty
public boolean isEmpty()
Determine if thisTuplecontains no elements.- Returns:
trueif thisTuplecontains no elements,falseotherwise
-
getLong
public long getLong(int index)
Gets an indexed item as along. This function will not do type conversion and so will throw aClassCastExceptionif the element is not a number type. The element at the index may not benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas along - Throws:
java.lang.ClassCastException- if the element atindexis not aNumberjava.lang.NullPointerException- if the element atindexisnull
-
getBytes
public byte[] getBytes(int index)
Gets an indexed item as abyte[]. This function will not do type conversion and so will throw aClassCastExceptionif the tuple element is not abytearray.- Parameters:
index- the location of the element to return- Returns:
- the item at
indexas abyte[] - Throws:
java.lang.ClassCastException- if the element atindexis not aNumber
-
getString
public java.lang.String getString(int index)
Gets an indexed item as aString. This function will not do type conversion and so will throw aClassCastExceptionif the tuple element is not ofStringtype.- Parameters:
index- the location of the element to return- Returns:
- the item at
indexas aString - Throws:
java.lang.ClassCastException- if the element atindexis not aString
-
getBigInteger
public java.math.BigInteger getBigInteger(int index)
Gets an indexed item as aBigInteger. This function will not do type conversion and so will throw aClassCastExceptionif the tuple element is not of aNumbertype. If the underlying type is a floating point value, this will lead to a loss of precision. The element at the index may not benull.- Parameters:
index- the location of the element to return- Returns:
- the item at
indexas aBigInteger - Throws:
java.lang.ClassCastException- if the element atindexis not aNumber
-
getFloat
public float getFloat(int index)
Gets an indexed item as afloat. This function will not do type conversion and so will throw aClassCastExceptionif the element is not a number type. The element at the index may not benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas afloat - Throws:
java.lang.ClassCastException- if the element atindexis not aNumber
-
getDouble
public double getDouble(int index)
Gets an indexed item as adouble. This function will not do type conversion and so will throw aClassCastExceptionif the element is not a number type. The element at the index may not benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas adouble - Throws:
java.lang.ClassCastException- if the element atindexis not aNumber
-
getBoolean
public boolean getBoolean(int index)
Gets an indexed item as aboolean. This function will not do type conversion and so will throw aClassCastExceptionif the element is not aBoolean. The element at the index may not benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas aboolean - Throws:
java.lang.ClassCastException- if the element atindexis not aBooleanjava.lang.NullPointerException- if the element atindexisnull
-
getUUID
public java.util.UUID getUUID(int index)
Gets an indexed item as aUUID. This function will not do type conversion and so will throw aClassCastExceptionif the element is not aUUID. The element at the index may benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas aUUID - Throws:
java.lang.ClassCastException- if the element atindexis not aUUID
-
getVersionstamp
public Versionstamp getVersionstamp(int index)
Gets an indexed item as aVersionstamp. This function will not do type conversion and so will throw aClassCastExceptionif the element is not aVersionstamp. The element at the index may benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas aVersionstamp - Throws:
java.lang.ClassCastException- if the element atindexis not aVersionstamp
-
getNestedList
public java.util.List<java.lang.Object> getNestedList(int index)
Gets an indexed item as aList. This function will not do type conversion and so will throw aClassCastExceptionif the element is not aListorTuple. The element at the index may benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas aList - Throws:
java.lang.ClassCastException- if the element atindexis not aListor aTuple
-
getNestedTuple
public Tuple getNestedTuple(int index)
Gets an indexed item as aTuple. This function will not do type conversion and so will throw aClassCastExceptionif the element is not aListorTuple. The element at the index may benull.- Parameters:
index- the location of the item to return- Returns:
- the item at
indexas aList - Throws:
java.lang.ClassCastException- if the element atindexis not aTupleor aList
-
get
public java.lang.Object get(int index)
Gets an indexed item without forcing a type.- Parameters:
index- the index of the item to return- Returns:
- an item from the list, without forcing type conversion
-
popFront
public Tuple popFront()
Creates a newTuplewith the first item of thisTupleremoved.- Returns:
- a newly created
Tuplewithout the first item of thisTuple - Throws:
java.lang.IllegalStateException- if thisTupleis empty
-
popBack
public Tuple popBack()
Creates a newTuplewith the last item of thisTupleremoved.- Returns:
- a newly created
Tuplewithout the last item of thisTuple - Throws:
java.lang.IllegalStateException- if thisTupleis empty
-
range
public Range range()
Returns a range representing all keys that encodeTuples strictly starting with thisTuple.
For example:Tuple t = Tuple.from("a", "b"); Range r = t.range();rincludes all tuples ("a", "b", ...)
This function will throw an error if thisTuplecontains an incompleteVersionstamp.- Returns:
- the range of keys containing all possible keys that have this
Tupleas a strict prefix
-
range
public Range range(byte[] prefix)
Returns a range representing all keys that encodeTuples strictly starting with the given prefix followed by thisTuple.
For example:Tuple t = Tuple.from("a", "b"); Range r = t.range(Tuple.from("c").pack());rcontains all tuples ("c", "a", "b", ...)
This function will throw an error if thisTuplecontains an incompleteVersionstamp.- Parameters:
prefix- a byte prefix to precede all elements in the range- Returns:
- the range of keys containing all possible keys that have
prefixfollowed by thisTupleas a strict prefix
-
hasIncompleteVersionstamp
public boolean hasIncompleteVersionstamp()
Determines if there is aVersionstampincluded in thisTuplethat has not had its transaction version set. It will search through nestedTuples contained within thisTuple. It will not throw an error if it finds multiple incompleteVersionstampinstances.- Returns:
- whether there is at least one incomplete
Versionstampincluded in thisTuple
-
getPackedSize
public int getPackedSize()
Get the number of bytes in the packed representation of thisTuple. This is done by summing the serialized sizes of all of the elements of thisTupleand does not pack everything into a singleTuple. The return value of this function is stored within thisTupleafter this function has been called so that subsequent calls on the same object are fast. This method does not validate that there is not more than one incompleteVersionstampin thisTuple.- Returns:
- the number of bytes in the packed representation of this
Tuple
-
compareTo
public int compareTo(Tuple t)
Compare the byte-array representation of thisTupleagainst another. This method will sortTuples in the same order that they would be sorted as keys in FoundationDB. Returns a negative integer, zero, or a positive integer when this object's byte-array representation is found to be less than, equal to, or greater than the specifiedTuple.- Specified by:
compareToin interfacejava.lang.Comparable<Tuple>- Parameters:
t- theTupleagainst which to compare- Returns:
- a negative integer, zero, or a positive integer when this
Tupleis less than, equal, or greater than the parametert.
-
hashCode
public int hashCode()
Returns a hash code value for thisTuple. Computing the hash code is fairly expensive as it involves packing the underlyingTupleto bytes. However, this value is memoized, so for any givenTuple, it only needs to be computed once. This means that it is generally safe to useTuples with hash-based data structures such asHashSets orHashMaps.- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code for this
Tuplethat can be used by hash tables
-
equals
public boolean equals(java.lang.Object o)
Tests for equality with anotherTuple. If the passed object is not aTuplethis returns false. If the object is aTuple, this returns true ifcompareTo()would return0.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifobjis aTupleand their binary representation is identical
-
toString
public java.lang.String toString()
Returns a string representing thisTuple. This contains human-readable representations of all of the elements of thisTuple. For most elements, this means using that object's default string representation. For byte-arrays, this means usingByteArrayUtil.printable()to produce a byte-string where most printable ASCII code points have been rendered as characters.- Overrides:
toStringin classjava.lang.Object- Returns:
- a human-readable
Stringrepresentation of thisTuple
-
fromItems
public static Tuple fromItems(java.lang.Iterable<?> items)
Creates a newTuplefrom a variable number of elements. The elements must follow the type guidelines fromadd, and so can only beStrings,byte[]s,Numbers,UUIDs,Booleans,Lists,Tuples, ornulls.- Parameters:
items- the elements from which to create theTuple- Returns:
- a new
Tuplewith the given items as its elements
-
fromList
public static Tuple fromList(java.util.List<?> items)
Efficiently creates a newTuplefrom a list of objects. The elements must follow the type guidelines fromadd, and so can only beStrings,byte[]s,Numbers,UUIDs,Booleans,Lists,Tuples, ornulls.- Parameters:
items- the elements from which to create theTuple.- Returns:
- a new
Tuplewith the given items as its elements
-
fromStream
public static Tuple fromStream(java.util.stream.Stream<?> items)
Efficiently creates a newTuplefrom aStreamof objects. The elements must follow the type guidelines fromadd, and so can only beStrings,byte[]s,Numbers,UUIDs,Booleans,Lists,Tuples, ornulls. Note that this class will consume all elements from theStream.- Parameters:
items- theStreamof items from which to create theTuple- Returns:
- a new
Tuplewith the given items as its elements
-
from
public static Tuple from(java.lang.Object... items)
Creates a newTuplefrom a variable number of elements. The elements must follow the type guidelines fromadd, and so can only beStrings,byte[]s,Numbers,UUIDs,Booleans,Lists,Tuples, ornulls.- Parameters:
items- the elements from which to create theTuple- Returns:
- a new
Tuplewith the given items as its elements
-
-