java.lang.Object
us.ajg0702.leaderboards.formatting.Format
us.ajg0702.leaderboards.formatting.formats.Default

public class Default extends Format
  • Constructor Details

    • Default

      public Default()
  • Method Details

    • matches

      public boolean matches(String output, String placeholder)
      Description copied from class: Format
      Tests if the provided placeholder (and possibly output) is readable with this format
      Specified by:
      matches in class Format
      Parameters:
      output - The string output from the placeholder
      placeholder - the placeholder without %
      Returns:
      True if this format supports parsing the output, false if it doesn't, or we're not sure
    • toDouble

      public double toDouble(String input)
      Description copied from class: Format
      Converts the provided input to a double using this format
      Specified by:
      toDouble in class Format
      Parameters:
      input - The string output from the placeholder
      Returns:
      A double representing the string format
    • toFormat

      public String toFormat(double input)
      Description copied from class: Format
      Converts a double into this format
      Specified by:
      toFormat in class Format
      Parameters:
      input - The provided double
      Returns:
      A string that is the provided double in this format
    • getName

      public String getName()
      Specified by:
      getName in class Format
      Returns:
      the (unique) name of this format