Package org.epics.pvdata.pv
Enum ScalarType
- java.lang.Object
-
- java.lang.Enum<ScalarType>
-
- org.epics.pvdata.pv.ScalarType
-
- All Implemented Interfaces:
Serializable,Comparable<ScalarType>
public enum ScalarType extends Enum<ScalarType>
Process Variable Scalar Data Type.- Author:
- mrk
-
-
Enum Constant Summary
Enum Constants Enum Constant Description pvBooleanValue has type boolean.pvByteValue has type byte.pvDoubleValue has type double.pvFloatvalue has type float.pvIntValue has type int.pvLongValue has type long.pvShortValue has type short.pvStringValue has type string.pvUByteValue has type ubyte.pvUIntValue has type uint.pvULongValue has type ulong.pvUShortValue has type ushort.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScalarTypegetScalarType(String type)Get the ScalarType for a string defining the type.booleanisInteger()Is this an integer (signed or unsigned).booleanisNumeric()Is this a Java numeric type?booleanisPrimitive()Is this a Java primitive type?booleanisUInteger()Is this an unsigned integer.StringtoString()static ScalarTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ScalarType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
pvBoolean
public static final ScalarType pvBoolean
Value has type boolean.
-
pvByte
public static final ScalarType pvByte
Value has type byte.
-
pvShort
public static final ScalarType pvShort
Value has type short.
-
pvInt
public static final ScalarType pvInt
Value has type int.
-
pvLong
public static final ScalarType pvLong
Value has type long.
-
pvUByte
public static final ScalarType pvUByte
Value has type ubyte.
-
pvUShort
public static final ScalarType pvUShort
Value has type ushort.
-
pvUInt
public static final ScalarType pvUInt
Value has type uint.
-
pvULong
public static final ScalarType pvULong
Value has type ulong.
-
pvFloat
public static final ScalarType pvFloat
value has type float.
-
pvDouble
public static final ScalarType pvDouble
Value has type double.
-
pvString
public static final ScalarType pvString
Value has type string.
-
-
Method Detail
-
values
public static ScalarType[] 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 (ScalarType c : ScalarType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ScalarType 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
-
isInteger
public boolean isInteger()
Is this an integer (signed or unsigned). true if byte, short, int, long, ubyte, ushort, uint, or ulong.- Returns:
- true if it is an integer type
-
isUInteger
public boolean isUInteger()
Is this an unsigned integer. true if ubyte, ushort, uint, or ulong.- Returns:
- true if it is an unsigned integer type
-
isNumeric
public boolean isNumeric()
Is this a Java numeric type?- Returns:
- true if the type is a Java numeric type. The numeric types are byte, short, int, long, float, and double.
-
isPrimitive
public boolean isPrimitive()
Is this a Java primitive type?- Returns:
- true if the type is a Java primitive type. The numeric types and boolean are primitive types.
-
getScalarType
public static ScalarType getScalarType(String type)
Get the ScalarType for a string defining the type.- Parameters:
type- a character string defining the type- Returns:
- the ScalarType or null if an illegal type
-
toString
public String toString()
- Overrides:
toStringin classEnum<ScalarType>
-
-