Interface IIncrementalFormatter

  • All Superinterfaces:
    IFormatter<IQuantity>

    public interface IIncrementalFormatter
    extends IFormatter<IQuantity>
    Quantity formatter extension to reduce redundant information when presenting multiple adjacent, and growing, quantities for human consumption.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String formatAdjacent​(IQuantity previous, IQuantity current)
      Return a string representation of current that is minimalistic, yet includes sufficient context so that a human can deduce its full value, given that a sufficient representation of previous is presented immediately ahead.
      java.lang.String formatContext​(IQuantity firstPresented)
      Return a string context that can be presented ahead of presenting firstPresented so that the latter can be presented with a minimalistic representation using formatChange(firstPresented, firstPresented).
    • Method Detail

      • formatContext

        java.lang.String formatContext​(IQuantity firstPresented)
        Return a string context that can be presented ahead of presenting firstPresented so that the latter can be presented with a minimalistic representation using formatChange(firstPresented, firstPresented).
      • formatAdjacent

        java.lang.String formatAdjacent​(IQuantity previous,
                                        IQuantity current)
        Return a string representation of current that is minimalistic, yet includes sufficient context so that a human can deduce its full value, given that a sufficient representation of previous is presented immediately ahead.
        Parameters:
        previous - the immediately preceding presented quantity, or null to force a fully qualified representation
        current - the quantity to format
        Returns:
        a minimalistic context sensitive representation