Class AsStringLocalStep<S,E>

All Implemented Interfaces:
Serializable, Cloneable, Iterator<Traverser.Admin<E>>, Step<S,E>

public final class AsStringLocalStep<S,E> extends ScalarMapStep<S,E>
Reference implementation for asString(Scope.local), a mid-traversal step which returns the value of the incoming traverser as a string. For a list traverser (Iterable, Iterator, or array), each element is converted to produce a list of strings. A null traverser, or a null element of a list traverser, raises an IllegalArgumentException.
Author:
David Bechberger (http://bechberger.com), Yang Xia (http://github.com/xiazcy)
See Also:
  • Constructor Details

  • Method Details

    • map

      protected E map(Traverser.Admin<S> traverser)
      Specified by:
      map in class ScalarMapStep<S,E>
    • getRequirements

      public Set<TraverserRequirement> getRequirements()
      Description copied from interface: Step
      Provide the necessary TraverserRequirement that must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set.
      Returns:
      the set of requirements