Class Version

java.lang.Object
net.codecrete.usb.Version

public final class Version extends Object
Semantic version number.
  • Constructor Details

    • Version

      public Version(int bcdVersion)
      Creates a new instance.

      bcdVersion contains the version: the high byte is the major version. The low byte is split into two nibbles (4 bits), the high one is minor version, the low one is the subminor version. As an example, 0x0321 represents the version 3.2.1.

      Parameters:
      bcdVersion - version, encoded as described above
  • Method Details

    • getMajor

      public int getMajor()
      Major version
      Returns:
      major version
    • getMinor

      public int getMinor()
      Minor version
      Returns:
      minor version
    • getSubminor

      public int getSubminor()
      Subminor version
      Returns:
      subminor version
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object