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.
|
SerializableFunction<S,T> |
bind(Type type)
Returns a function that applies this transform to values of the given
type . |
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 the transform. |
UnboundPredicate<T> |
projectStrict(java.lang.String name,
BoundPredicate<S> predicate)
Transforms a
predicate to a strict predicate on the partition values
produced by the transform. |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dedupName, isIdentity, isVoid, preservesOrder, satisfiesOrderOf, toHumanString, toHumanString
public T apply(S value)
Transform
public SerializableFunction<S,T> bind(Type type)
Transform
type
.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 the transform.
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 the transform.
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