Class ComparableText

  • All Implemented Interfaces:
    Comparable<Text>, Text

    public final class ComparableText
    extends TextEnvelope
    implements Comparable<Text>
    Text implementing Comparable.
    Below the example how you can sort words in a string:
    
     Iterable<Text> sorted = new Sorted<>(
         new Mapped<>(
             ComparableText::new,
             new SplitText("The quick brown fox jumps over the lazy dog", " ")
         )
     )
     

    There is no thread-safety guarantee.

    Since:
    0.27
    • Constructor Detail

      • ComparableText

        public ComparableText​(Text text)
        Ctor.
        Parameters:
        text - The text