public class UnknownTransform<S,T> extends java.lang.Object implements Transform<S,T>
Modifier and Type | Method and Description |
---|---|
T |
apply(S value)
Transforms a value to its corresponding partition value.
|
boolean |
canTransform(Type type)
Checks whether this function can be applied to the given
Type . |
boolean |
equals(java.lang.Object other) |
Type |
getResultType(Type type)
Returns the
Type produced by this transform given a source type. |
int |
hashCode() |
UnboundPredicate<T> |
project(java.lang.String name,
BoundPredicate<S> predicate)
Transforms a
predicate to an inclusive predicate on the partition
values produced by Transform.apply(Object) . |
UnboundPredicate<T> |
projectStrict(java.lang.String name,
BoundPredicate<S> predicate)
Transforms a
predicate to a strict predicate on the partition values
produced by Transform.apply(Object) . |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dedupName, isIdentity, preservesOrder, satisfiesOrderOf, toHumanString
public T apply(S value)
Transform
public boolean canTransform(Type type)
Transform
Type
.canTransform
in interface Transform<S,T>
type
- a typepublic Type getResultType(Type type)
Transform
Type
produced by this transform given a source type.getResultType
in interface Transform<S,T>
type
- a typepublic UnboundPredicate<T> project(java.lang.String name, BoundPredicate<S> predicate)
Transform
predicate
to an inclusive predicate on the partition
values produced by Transform.apply(Object)
.
This inclusive transform guarantees that if pred(v) is true, then projected(apply(v)) is true.
public UnboundPredicate<T> projectStrict(java.lang.String name, BoundPredicate<S> predicate)
Transform
predicate
to a strict predicate on the partition values
produced by Transform.apply(Object)
.
This strict transform guarantees that if strict(apply(v)) is true, then pred(v) is also true.
projectStrict
in interface Transform<S,T>
name
- the field name for partition valuespredicate
- a predicate for source valuespublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object