Package edu.harvard.hul.ois.jhove
Enum PropertyArity
- java.lang.Object
-
- java.lang.Enum<PropertyArity>
-
- edu.harvard.hul.ois.jhove.PropertyArity
-
- All Implemented Interfaces:
Serializable,Comparable<PropertyArity>
public enum PropertyArity extends Enum<PropertyArity>
This class represents the arity (structure type) of a Property. Applications will not create or modify PropertyArities, but will use one of the predefined PropertyArity instances ARRAY, LIST, MAP, SCALAR, or SET.- See Also:
Property
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAYAn Arity corresponding to a Java array.LISTAn Arity corresponding to java.util.List or any of its derived classes.MAPAn Arity corresponding to java.util.Map or any of its derived classes.SCALARAn Arity corresponding to a simple object, which must be of a type corresponding to one of the instances ofPropertyType.SETAn Arity corresponding to java.util.Set or any of its derived classes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()static PropertyArityvalueOf(String name)Returns the enum constant of this type with the specified name.static PropertyArity[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ARRAY
public static final PropertyArity ARRAY
An Arity corresponding to a Java array. For the Java typesInteger,Boolean,Byte,Character,Double,Float,Long, andShort, a Property with arity ARRAY is an array of primitive Java types rather than Objects (e.g.,intrather thanInteger).
-
LIST
public static final PropertyArity LIST
An Arity corresponding to java.util.List or any of its derived classes.
-
MAP
public static final PropertyArity MAP
An Arity corresponding to java.util.Map or any of its derived classes.
-
SCALAR
public static final PropertyArity SCALAR
An Arity corresponding to a simple object, which must be of a type corresponding to one of the instances ofPropertyType.
-
SET
public static final PropertyArity SET
An Arity corresponding to java.util.Set or any of its derived classes.
-
-
Field Detail
-
name
public final String name
A String name for the Arity, used for reporting.
-
-
Method Detail
-
values
public static PropertyArity[] 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 (PropertyArity c : PropertyArity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropertyArity 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 nameNullPointerException- if the argument is null
-
toString
public String toString()
- Overrides:
toStringin classEnum<PropertyArity>
-
-