Class BaseEncoding.Alphabet

    • Field Detail

      • name

        private final java.lang.String name
      • chars

        private final char[] chars
      • mask

        final int mask
      • bitsPerChar

        final int bitsPerChar
      • charsPerChunk

        final int charsPerChunk
      • bytesPerChunk

        final int bytesPerChunk
      • decodabet

        private final byte[] decodabet
      • validPadding

        private final boolean[] validPadding
    • Constructor Detail

      • Alphabet

        Alphabet​(java.lang.String name,
                 char[] chars)
    • Method Detail

      • encode

        char encode​(int bits)
      • isValidPaddingStartPosition

        boolean isValidPaddingStartPosition​(int index)
      • canDecode

        boolean canDecode​(char ch)
      • hasLowerCase

        private boolean hasLowerCase()
      • hasUpperCase

        private boolean hasUpperCase()
      • matches

        public boolean matches​(char c)
        Description copied from class: CharMatcher
        Determines a true or false value for the given character.
        Specified by:
        matches in class CharMatcher
      • toString

        public java.lang.String toString()
        Description copied from class: CharMatcher
        Returns a string representation of this CharMatcher, such as CharMatcher.or(WHITESPACE, JAVA_DIGIT).
        Overrides:
        toString in class CharMatcher
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object other)
        Description copied from interface: Predicate
        Indicates whether another object is equal to this predicate.

        Most implementations will have no reason to override the behavior of Object.equals(java.lang.Object). However, an implementation may also choose to return true whenever object is a Predicate that it considers interchangeable with this one. "Interchangeable" typically means that this.apply(t) == that.apply(t) for all t of type T). Note that a false result from this method does not imply that the predicates are known not to be interchangeable.

        Specified by:
        equals in interface Predicate<java.lang.Character>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object