Module org.snmp4j

Enum MaxAccess

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MaxAccess>

    public enum MaxAccess
    extends java.lang.Enum<MaxAccess>
    The MaxAccess enumerates the MAX-ACCESS values of SMIv2 and the deprecated writeOnly of SMIv1.
    Since:
    2.5.0
    Author:
    Frank Fock
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MaxAccess fromSmiValue​(java.lang.String smiValue)
      Gets the MaxAccess from a MAX-ACCESS (or ACCESS in SMIv1) clause string.
      java.lang.String getSmiValue()
      Gets the MAX-ACCESS (or ACCESS in SMIv1) clause string.
      boolean isCreatable()
      Checks if the maximum access is creatable.
      boolean isReadOnly()
      Checks if the maximum access is readOnly.
      boolean isWritable()
      Checks if the maximum access is writable.
      static MaxAccess valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MaxAccess[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • notAccessible

        public static final MaxAccess notAccessible
      • accessibleForNotify

        public static final MaxAccess accessibleForNotify
      • writeOnly

        public static final MaxAccess writeOnly
      • readOnly

        public static final MaxAccess readOnly
      • readWrite

        public static final MaxAccess readWrite
      • readCreate

        public static final MaxAccess readCreate
    • Method Detail

      • values

        public static MaxAccess[] 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 (MaxAccess c : MaxAccess.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MaxAccess valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSmiValue

        public java.lang.String getSmiValue()
        Gets the MAX-ACCESS (or ACCESS in SMIv1) clause string.
        Returns:
        the SMI access string.
      • fromSmiValue

        public static MaxAccess fromSmiValue​(java.lang.String smiValue)
        Gets the MaxAccess from a MAX-ACCESS (or ACCESS in SMIv1) clause string.
        Parameters:
        smiValue - the SMI access string.
        Returns:
        null if smiValue is not a valid ACCESS/MAX-ACCESS clause value or the matching enumeration value.
      • isReadOnly

        public boolean isReadOnly()
        Checks if the maximum access is readOnly.
        Returns:
        true if this maximum access equals readOnly.
      • isWritable

        public boolean isWritable()
        Checks if the maximum access is writable.
        Returns:
        true if this maximum access equals readWrite or readCreate.
      • isCreatable

        public boolean isCreatable()
        Checks if the maximum access is creatable.
        Returns:
        true if this maximum access equals readCreate.