Enum ApiProperty.SCOPE

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ApiProperty.SCOPE>
    Enclosing class:
    ApiProperty

    public static enum ApiProperty.SCOPE
    extends java.lang.Enum<ApiProperty.SCOPE>
    Defines the scope in which the property is being serialized in.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOTH
      The property will be serialized as part of both a main and a sub-entity.
      INLINE
      The property will only be serialized as part of a sub-enity.
      RESOURCE
      The property will only be serialized as part of a main entity.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(ApiProperty.SCOPE scope)
      Determines if the current scope contains the passed in scope value.
      static ApiProperty.SCOPE valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ApiProperty.SCOPE[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

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

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

      • RESOURCE

        public static final ApiProperty.SCOPE RESOURCE
        The property will only be serialized as part of a main entity.
      • INLINE

        public static final ApiProperty.SCOPE INLINE
        The property will only be serialized as part of a sub-enity.
      • BOTH

        public static final ApiProperty.SCOPE BOTH
        The property will be serialized as part of both a main and a sub-entity.
    • Method Detail

      • values

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

        public static ApiProperty.SCOPE 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
      • contains

        public boolean contains​(ApiProperty.SCOPE scope)
        Determines if the current scope contains the passed in scope value. If the current scope is SCOPE.BOTH true is always returned. Otherwise a direct comparison of the current scope and the passed one is done.
        Parameters:
        scope - The scope value to test the current scope against.
        Returns:
        True is the current scope contains the passed in scope, false otherwise.