@InterfaceAudience.Public @InterfaceStability.Stable public abstract class TupleFactory extends java.lang.Object implements TupleMaker<Tuple>
getInstance()
will create a
an instance of the named class using the indicated jar. Otherwise, it
will create an instance of DefaultTupleFactory
.Modifier | Constructor and Description |
---|---|
protected |
TupleFactory() |
Modifier and Type | Method and Description |
---|---|
static TupleFactory |
getInstance()
Get a reference to the singleton factory.
|
abstract boolean |
isFixedSize()
This method is used to inspect whether the Tuples created by this factory
will be of a fixed size when they are created.
|
abstract Tuple |
newTuple()
Create an empty tuple.
|
abstract Tuple |
newTuple(int size)
Create a tuple with size fields.
|
abstract Tuple |
newTuple(java.util.List c)
Create a tuple from the provided list of objects.
|
abstract Tuple |
newTuple(java.lang.Object datum)
Create a tuple with a single element.
|
abstract Tuple |
newTupleNoCopy(java.util.List list)
Create a tuple from a provided list of objects, keeping the provided
list.
|
static void |
resetSelf()
Provided for testing purposes only.
|
abstract java.lang.Class<? extends Tuple> |
tupleClass()
Return the actual class representing a tuple that the implementing
factory will be returning.
|
java.lang.Class<? extends TupleRawComparator> |
tupleRawComparatorClass()
Return the actual class implementing the raw comparator for tuples
that the factory will be returning.
|
public static TupleFactory getInstance()
public abstract Tuple newTuple()
newTuple
in interface TupleMaker<Tuple>
public abstract Tuple newTuple(int size)
newTuple
in interface TupleMaker<Tuple>
size
- Number of fields in the tuple.public abstract Tuple newTuple(java.util.List c)
c
- List of objects to use as the fields of the tuple.public abstract Tuple newTupleNoCopy(java.util.List list)
list
- List of objects that will become the fields of the tuple.public abstract Tuple newTuple(java.lang.Object datum)
datum
- Datum to put in the tuple.public abstract java.lang.Class<? extends Tuple> tupleClass()
public static void resetSelf()
public java.lang.Class<? extends TupleRawComparator> tupleRawComparatorClass()
public abstract boolean isFixedSize()
Copyright © 2007-2012 The Apache Software Foundation