Class Outputs<T>

    • Constructor Detail

      • Outputs

        public Outputs()
    • Method Detail

      • common

        public abstract T common​(T output1,
                                 T output2)
        Eg common("foobar", "food") -> "foo"
      • subtract

        public abstract T subtract​(T output,
                                   T inc)
        Eg subtract("foobar", "foo") -> "bar"
      • add

        public abstract T add​(T prefix,
                              T output)
        Eg add("foo", "bar") -> "foobar"
      • write

        public abstract void write​(T output,
                                   DataOutput out)
                            throws java.io.IOException
        Encode an output value into a DataOutput.
        Throws:
        java.io.IOException
      • writeFinalOutput

        public void writeFinalOutput​(T output,
                                     DataOutput out)
                              throws java.io.IOException
        Encode an final node output value into a DataOutput. By default this just calls write(Object, DataOutput).
        Throws:
        java.io.IOException
      • read

        public abstract T read​(DataInput in)
                        throws java.io.IOException
        Decode an output value previously written with write(Object, DataOutput).
        Throws:
        java.io.IOException
      • getNoOutput

        public abstract T getNoOutput()
        NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
      • outputToString

        public abstract java.lang.String outputToString​(T output)
      • merge

        public T merge​(T first,
                       T second)