public class longchar extends Text
Although Progress documentation states that the default value of any longchar
variable is the unknown value, the real behavior is that it gets initialized to the empty
string, same as character variables get initialized.
Constructor and Description |
---|
longchar()
Default constructor, creates an instance that represents the unknown value.
|
longchar(BaseDataType value)
This is a special c'tor which should be used only when converting the
value returned by a function or method with polymorphic return type into the
expected type (i.e.
|
longchar(char ch)
Constructs an instance that has a
char value passed
in and which does not represent the unknown value . |
longchar(java.lang.String value)
Constructs an instance that has the
String value passed
in and which does not represent the unknown value ,
unless the value argument is null . |
longchar(java.lang.String value,
boolean caseSens)
Constructs an instance that has the
String value passed
in and which does not represent the unknown value
unless the value argument is null . |
longchar(Text value)
Create a new instance, by copying the state of the passed
Text . |
longchar(Text value,
boolean output)
Create a new instance, by copying the state of the passed
Text . |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj)
Compares this instance with the specified instance and returns a -1
if this instance is less than the specified, 0 if the two instances
are equal and 1 if this instance is greater than the specified
instance.
|
java.lang.String |
defaultFormatString()
Return the default display format string for this type.
|
BaseDataType |
duplicate()
Does the same as standard
clone() method but returns an
instance of BaseDataType and doesn't throw the
CloneNotSupportedException . |
static character |
getCodePage(longchar value)
Returns the code page of a the specified longchar variable.
|
protected BaseDataType |
instantiateDefaultExtent()
Get the default initialization for an extent variable of this type.
|
BaseDataType |
instantiateUnknown()
Creates a new instance of the same type that represents the
unknown value . |
static logical |
isCodePageFixed(longchar value)
Return
true if the codepage of the given longchar variable
is fixed. |
boolean |
isEmbeddedNullAllowed()
Report if existing instances that have embedded null characters are allowed to be
assigned to this instance.
|
java.lang.String |
toString(java.lang.String fmt)
Creates a string representation of the instance data using the user-
specified Progress 4GL format string.
|
java.lang.String |
toStringExport()
Creates a string representation of the instance data using the 'export'
format.
|
java.lang.String |
toStringMessage()
Creates a string representation of the instance data in a form that is
compatible with the
MESSAGE language statement. |
assign, assign, assign, assign, assign, caseSensitiveHashCode, deepAssign, equalsCaseSensitively, getValue, hashCode, isCaseSensitive, isUnknown, javaSpacifyNull, javaTruncateNull, maximum, minimum, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, overlay, progressSpacifyNull, readChar, readExternal, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, replaceEntry, setCaseSensitive, setTemporaryCaseSensitive, setUnknown, setValue, toJavaType, writeExternal
assign, calcFormatLength, deepCopy, elementsOfType, equals, formatLength, generateDefault, generateUnknown, getTypeName, incompatibleTypesOnConversion, initializeDefaultExtent, instantiateDefault, isUnknownValue, maximum, minimum, notUnknownValue, sameType
changed, checkUndoable, checkUndoable, checkUndoable, getTransLevel, isGlobal, isUndoable, markUndoable, popBlock, rollback, setGlobal
public longchar()
public longchar(BaseDataType value)
Only Text (character or longchar) BDT's can be converted to longchar.
value
- The value to be used for this instance.public longchar(java.lang.String value)
String
value passed
in and which does not represent the unknown value
,
unless the value
argument is null
.value
- The character value of the resulting instance.public longchar(java.lang.String value, boolean caseSens)
String
value passed
in and which does not represent the unknown value
unless the value
argument is null
.value
- The character value of the resulting instance.caseSens
- Specifies whether this instance should use case sensitive
comparisons.public longchar(char ch)
char
value passed
in and which does not represent the unknown value
.ch
- The character value of the resulting instance.public longchar(Text value)
Text
.value
- The value which needs to be copied.public longchar(Text value, boolean output)
Text
.
If the output
parameter is set to true
, it
means that the referenced value is saved, as the passed instance will
be passed to a function call, and the state might need to be updated
on function exit.value
- The value which needs to be copied.output
- Flag indicating if this instance is passed to as a reference
for an output parameter.public boolean isEmbeddedNullAllowed()
isEmbeddedNullAllowed
in class Text
false
.public int compareTo(java.lang.Object obj)
Comparable
interface.public static character getCodePage(longchar value)
value
- The value for which the codepage will be retrieved.public BaseDataType instantiateUnknown()
unknown value
.instantiateUnknown
in class Text
unknown value
.public static logical isCodePageFixed(longchar value)
true
if the codepage of the given longchar variable
is fixed.value
- The value for which the codepage will be retrieved.public java.lang.String defaultFormatString()
defaultFormatString
in class BaseDataType
public BaseDataType duplicate()
clone()
method but returns an
instance of BaseDataType
and doesn't throw the
CloneNotSupportedException
.duplicate
in class BaseDataType
public java.lang.String toStringMessage()
MESSAGE
language statement. If the
instance represents the unknown value
, a '?' will be
returned.toStringMessage
in class BaseDataType
public java.lang.String toStringExport()
unknown value
, a '?' will be returned. Any instances of
double quotes inside the string will be doubled up on output.toStringExport
in class BaseDataType
public java.lang.String toString(java.lang.String fmt)
toString
in class BaseDataType
fmt
- The Progress 4GL format string for a character data type.protected BaseDataType instantiateDefaultExtent()
instantiateDefaultExtent
in class BaseDataType