public enum ConstantType extends Enum<ConstantType>
Constant
.
The enumerated types of ConstantType are used to identify different subtypes of Constant.
Enum Constant and Description |
---|
DeferredFunctionalUniqueID
A special type of unique identifier to only be used by functional predicates in special situations.
|
Double
A
DoubleAttribute argument. |
Integer
An
IntegerAttribute argument. |
Long
A
Long argument. |
String
A
StringAttribute argument. |
UniqueIntID
A
UniqueIntID argument. |
UniqueStringID
A
UniqueStringID argument. |
Modifier and Type | Method and Description |
---|---|
static Constant |
getConstant(String value,
ConstantType type)
Convert a general string into the appropriate Constant.
|
abstract String |
getName() |
static ConstantType |
getType(Constant term) |
abstract boolean |
isInstance(Constant term)
Returns whether a GroundTerm is of the type identified by this ArgumentType
|
static ConstantType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConstantType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConstantType String
StringAttribute
argument.public static final ConstantType Integer
IntegerAttribute
argument.public static final ConstantType Double
DoubleAttribute
argument.public static final ConstantType Long
Long
argument.public static final ConstantType UniqueIntID
UniqueIntID
argument.
A unique identifier that is explicitly an int.
Will generally perform faster than a UniqueStringID.public static final ConstantType UniqueStringID
UniqueStringID
argument.
A unique identifier that is explicitly a String.
Will generally perform slower than a UniqueIntID.public static final ConstantType DeferredFunctionalUniqueID
public static ConstantType[] values()
for (ConstantType c : ConstantType.values()) System.out.println(c);
public static ConstantType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract String getName()
public abstract boolean isInstance(Constant term)
term
- the term to checkpublic static ConstantType getType(Constant term)
public static Constant getConstant(String value, ConstantType type)
Copyright © 2022 University of California, Santa Cruz. All rights reserved.