Interface RealRepresentation.Cutter

  • Enclosing class:
    RealRepresentation

    public static interface RealRepresentation.Cutter
    A Cutter is used to shorten numbers. This can either be done by cutting, by rounding or somenthing else.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String cut​(java.lang.String str, int len)
      Returns a substring of str with length len or throws an exception.
    • Method Detail

      • cut

        java.lang.String cut​(java.lang.String str,
                             int len)
        Returns a substring of str with length len or throws an exception.
        Parameters:
        str - a String with str.length() >= len.
        len - the desired length of the resulting string.
        Returns:
        a substring of str with length len.
        Throws:
        java.lang.RuntimeException - by need if the cut is not allowed.