Class EntityTransformCoalesce<T>
java.lang.Object
org.aksw.commons.codec.entity.impl.EntityTransformCoalesce<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Function<T,,T> EntityTransform<T>
EntityTransform based on a collection of transforms that is delegated to.
For a given argument the first applicable transform from the backing collection
is taken and applied.
If there is no applicable transform for an argument an
IllegalArgumentException is raised.- Author:
- Claus Stadler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntityTransformCoalesce(Collection<? extends EntityTransform<T>> transforms) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <T> EntityTransformCoalesce<T>create(Collection<? extends EntityTransform<T>> transforms) findApplicableTransforms(T entity) getFirstApplicableTransform(T entity) tryGetFirstApplicableTransform(T entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.commons.codec.entity.api.EntityTransform
applyOrGetAsGiven
-
Field Details
-
transforms
-
-
Constructor Details
-
EntityTransformCoalesce
-
-
Method Details
-
canApply
- Specified by:
canApplyin interfaceEntityTransform<T>
-
apply
-
tryGetFirstApplicableTransform
-
getFirstApplicableTransform
-
findApplicableTransforms
-
create
public static <T> EntityTransformCoalesce<T> create(Collection<? extends EntityTransform<T>> transforms)
-