Class CDKey

  • All Implemented Interfaces:
    java.io.Serializable

    public class CDKey
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CDKey​(java.lang.String cdKey)
      Parses the given string into a CD-Key.
      CDKey​(java.util.BitSet bs)  
    • Constructor Detail

      • CDKey

        public CDKey​(java.lang.String cdKey)
        Parses the given string into a CD-Key. Should have 6 Base32 digits, optionally with a dash in the middle, like: "ABC-123". Case insensitive.
      • CDKey

        public CDKey​(java.util.BitSet bs)
    • Method Detail

      • newRandomCDKey

        public static CDKey newRandomCDKey()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getCDKey

        public java.lang.String getCDKey()
        Returns the key as a string without the dash in the middle
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object