Enum PermissionTarget

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

    public enum PermissionTarget
    extends java.lang.Enum<PermissionTarget>
    Defines the set of targets required for the default permissions
    • Field Detail

      • target

        public final java.lang.String target
    • Constructor Detail

      • PermissionTarget

        private PermissionTarget​(java.lang.String target)
    • Method Detail

      • values

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

        public static PermissionTarget 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
      • fromString

        public static PermissionTarget fromString​(java.lang.String string)
        If there is any target that matches the string, return it. If no matches, return NONE;
        Parameters:
        string - a permission target value
        Returns:
        the closest matching default targets value