Enum HotRodVersion

    • Method Detail

      • values

        public static HotRodVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HotRodVersion c : HotRodVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HotRodVersion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getVersion

        public byte getVersion()
      • isOlder

        public boolean isOlder​(byte version)
        Checks whether the supplied version is older than the version represented by this object
        Parameters:
        version - a Hot Rod version in its wire representation
        Returns:
        true if version is older than this
      • isAtLeast

        public boolean isAtLeast​(byte version)
        Checks whether the supplied version is equal or greater than the version represented by this object
        Parameters:
        version - a Hot Rod version in its wire representation
        Returns:
        true if version is equal or greater than this
      • forVersion

        public static HotRodVersion forVersion​(byte version)