Package oracle.pgx.common.types
Enum ReturnType
- java.lang.Object
-
- java.lang.Enum<ReturnType>
-
- oracle.pgx.common.types.ReturnType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ReturnType>,Type
public enum ReturnType extends java.lang.Enum<ReturnType> implements Type
All function return types supported by Green-Marl language
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getTypeClass()Gets the type class.static ReturnTypegetTypeFor(java.lang.Class<?> typeClass)Returns the ReturnType based on a typeClass.static ReturnTypeparseReturnType(java.lang.String input)Parse ReturnType from a string value.java.lang.StringtoKey()Returns the key of this type as string.java.lang.StringtoString()Returns the key of this type as string.static ReturnTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ReturnType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INTEGER
public static final ReturnType INTEGER
Integer return type
-
LONG
public static final ReturnType LONG
Long return type
-
FLOAT
public static final ReturnType FLOAT
Float return type
-
DOUBLE
public static final ReturnType DOUBLE
Double return type
-
BOOLEAN
public static final ReturnType BOOLEAN
Boolean return type
-
STRING
public static final ReturnType STRING
String return type
-
DATE
public static final ReturnType DATE
Date return type
-
VOID
public static final ReturnType VOID
Void return type
-
-
Method Detail
-
values
public static ReturnType[] 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 (ReturnType c : ReturnType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReturnType 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
-
getTypeFor
public static ReturnType getTypeFor(java.lang.Class<?> typeClass)
Returns the ReturnType based on a typeClass.- Parameters:
typeClass- Use this typeClass to derive the ReturnType- Returns:
- The ReturnType that belongs to this typeClass
-
parseReturnType
public static ReturnType parseReturnType(java.lang.String input)
Parse ReturnType from a string value.- Parameters:
input- Value to use to parse an ReturnType from. You can use the output oftoString()as input.- Returns:
- The ReturnType derived from the string input.
-
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<ReturnType>- Returns:
- the String representation of this type, which is the enum key.
-
-