Class SingletonTokenStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public final class SingletonTokenStream
    extends TokenStream
    SingletonTokenStream implements a token stream that wraps a single value with a given property type. The property type is stored as a payload on the single returned token.
    • Constructor Detail

      • SingletonTokenStream

        public SingletonTokenStream​(String value,
                                    Payload payload)
        Creates a new SingleTokenStream with the given value and payload.
        Parameters:
        value - the string value that will be returned with the token.
        payload - the payload that will be attached to this token
      • SingletonTokenStream

        public SingletonTokenStream​(String value,
                                    int type)
        Creates a new SingleTokenStream with the given value and a property type.
        Parameters:
        value - the string value that will be returned with the token.
        type - the JCR property type.