Class NumberFormattingTransformer<T>

  • All Implemented Interfaces:
    com.google.common.base.Function<T,​java.lang.String>, java.util.function.Function<T,​java.lang.String>

    public class NumberFormattingTransformer<T>
    extends java.lang.Object
    implements com.google.common.base.Function<T,​java.lang.String>
    Transforms inputs to String representations by chaining an input Number-generating Function with an internal NumberFormat instance.
    Author:
    Joshua O'Madadhain
    • Constructor Summary

      Constructors 
      Constructor Description
      NumberFormattingTransformer​(com.google.common.base.Function<T,​? extends java.lang.Number> values)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String apply​(T input)
      Returns a formatted string for the input.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • NumberFormattingTransformer

        public NumberFormattingTransformer​(com.google.common.base.Function<T,​? extends java.lang.Number> values)
    • Method Detail

      • apply

        public java.lang.String apply​(T input)
        Returns a formatted string for the input.
        Specified by:
        apply in interface com.google.common.base.Function<T,​java.lang.String>
        Specified by:
        apply in interface java.util.function.Function<T,​java.lang.String>