public class ISO8601DatePartitioner extends java.lang.Object implements DataPartitioner
Assumes that the dates are passed to the partitioner in String format
| Constructor and Description |
|---|
ISO8601DatePartitioner() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.math.BigInteger> |
arrayToPartitions(java.util.List<?> elementList,
java.lang.String type)
Creates partitions for an array of the same type of elements - used when a data value field is an array and we wish to encode these into the return value.
|
java.lang.Object |
fromPartitions(java.util.List<java.math.BigInteger> parts,
int partsIndex,
java.lang.String type)
Method to reconstruct an Object given a List of its BigInteger partition elements and its type identifier.
|
int |
getBits(java.lang.String type)
Returns the number of bits of an object with the given type.
|
int |
getNumPartitions(java.lang.String type)
Method to get the number of partitions of the data object given the type.
|
java.util.List<java.math.BigInteger> |
getPaddedPartitions(java.lang.String type)
Method to get an empty set of partitions by data type - used for padding return array values.
|
java.util.List<java.math.BigInteger> |
toPartitions(java.lang.Object object,
java.lang.String type)
Method to partition the given Object into a List of BigInteger partition elements given its type identifier.
|
public java.util.List<java.math.BigInteger> toPartitions(java.lang.Object object,
java.lang.String type)
throws PIRException
DataPartitionerIf the Object does not have/need a specific type identifier, use null.
toPartitions in interface DataPartitionerPIRExceptionpublic java.lang.Object fromPartitions(java.util.List<java.math.BigInteger> parts,
int partsIndex,
java.lang.String type)
throws PIRException
DataPartitionerIf the Object does not have/need a specific type identifier, use null.
fromPartitions in interface DataPartitionerPIRExceptionpublic int getBits(java.lang.String type)
DataPartitionergetBits in interface DataPartitionerpublic java.util.List<java.math.BigInteger> arrayToPartitions(java.util.List<?> elementList,
java.lang.String type)
throws PIRException
DataPartitionerarrayToPartitions in interface DataPartitionerPIRExceptionpublic java.util.List<java.math.BigInteger> getPaddedPartitions(java.lang.String type)
throws PIRException
DataPartitionergetPaddedPartitions in interface DataPartitionerPIRExceptionpublic int getNumPartitions(java.lang.String type)
throws PIRException
DataPartitionergetNumPartitions in interface DataPartitionerPIRException