Package oracle.pgx.common.types
Enum CollectionType
- java.lang.Object
-
- java.lang.Enum<CollectionType>
-
- oracle.pgx.common.types.CollectionType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CollectionType>,Type
public enum CollectionType extends java.lang.Enum<CollectionType> implements Type
All supported collection types.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getTypeClass()Gets the type class.static CollectionTypegetTypeFor(java.lang.Class<?> typeClass)Returns the CollectionType based on a typeClass.static CollectionTypeparseCollectionType(java.lang.String input)java.lang.StringtoKey()Returns the key of this type as string.java.lang.StringtoString()Returns the key of this type as string.static CollectionTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CollectionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ORDER
public static final CollectionType ORDER
CollectionType Order, like a set, but with ordering.
-
SEQUENCE
public static final CollectionType SEQUENCE
CollectionType Sequence, ordered and allows to contain values multiple times.
-
SET
public static final CollectionType SET
CollectionType Set, each value can only appear once, ordering does not matter.
-
-
Method Detail
-
values
public static CollectionType[] 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 (CollectionType c : CollectionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CollectionType 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 namejava.lang.NullPointerException- if the argument is null
-
parseCollectionType
public static CollectionType parseCollectionType(java.lang.String input)
-
getTypeFor
public static CollectionType getTypeFor(java.lang.Class<?> typeClass)
Returns the CollectionType based on a typeClass.- Parameters:
typeClass- Use this typeClass to derive the CollectionType- Returns:
- The CollectionType that belongs to this typeClass
-
getTypeClass
public java.lang.Class<?> getTypeClass()
Description copied from interface:TypeGets the type class.- Specified by:
getTypeClassin interfaceType- Returns:
- the Java class this type maps to
-
toKey
public java.lang.String toKey()
Description copied from interface:TypeReturns the key of this type as string.
-
toString
public java.lang.String toString()
Returns the key of this type as string. SeetoKey().- Overrides:
toStringin classjava.lang.Enum<CollectionType>- Returns:
- the String representation of this type, which is the enum key.
-
-