Interface CharDigitSet


public interface CharDigitSet
Interface for sets of digit characters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new CharDigitSet instead from the specified list.
    int
    toDigit(char ch)
    Returns a value in the range 0 to 9 if the specified character is a digit.
  • Method Details

    • toDigit

      int toDigit(char ch)
      Returns a value in the range 0 to 9 if the specified character is a digit. Otherwise, Returns a value greater than 9.
      Parameters:
      ch - a character
      Returns:
      a value in the range 0 to Integer.MAX_VALUE.
    • copyOf

      static CharDigitSet copyOf(List<Character> digits)
      Creates a new CharDigitSet instead from the specified list.

      The list must contain characters for the digits 0 to 9.

      Parameters:
      digits - a list of digit characters
      Returns:
      a new ByteDigitSet instance