A Primitive class is a class that contains a single property (its value). A reference to the identifier is a reference to the value of the object. The value of a primitive class object is stored in the variable used as its identifier. The Primitive class is both an individual class containing methods, as well as a grouping of classes. The Primitive class contains methods that are inherited (and therefore available) to all the other classes within the Primitive class grouping.
The following guidelines apply to primitive classes:
A primitive class object can be intrinsically cast to any other primitive class. However, the cast may generate a result that is not equivalent to the original value and is non-reversible (e.g., String "123Hello" becomes Number 123).
A primitive object can be explicitly cast to a reference class if a method(s) exists to cast it (e.g., String.toRow).
A primitive class can have subclasses.
A primitive class can be declared as Public scope. Public scope objects continue to exist when the process exits and are deleted either at a stack level where they have been previously scoped, or when the process exits.
Boolean and arithmetic operators compare the values of primitive class operands.
Numeric Literals are in the Number class.
String Literals are in the String class.
Intrinsic functions will map to a method in one of the primitive classes. The return type of that method determines the return type of the intrinsic function. The return type of an extrinsic function is String.
The following primitive classes exist in PSL:
Class |
Description |
Primitive class for the Blob column. This class does not provide additional methods. | |
Primitive class for Booleans. This class does not provide additional methods. | |
Primitive class that treats its value as a sequence of bytes instead of as a sequence of characters. | |
Contains methods used to format date fields for output, or otherwise manipulate dates (e.g., getting months, handle frequencies, etc.). | |
Primitive class for the Memo column. This class does not provide additional methods. | |
Contains methods that format numbers and access individual digits within a number. | |
The superclass of all classes that have a primitive data type. | |
Contains methods used to manipulate data defined as String data type. | |
Primitive class for the Time column. |