Package com.softwaremining.util
Class CBLUtil
java.lang.Object
com.softwaremining.util.CBLUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final String
capitalize
(String name) static String
charValue
(int ord) Translation of COBOL INTRINSIC FUNCTION ORD.static final int
dateOfInteger
(long days) Replacement for function 'date-of-integer' converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).static String
dateOfIntegerAsStr
(long days) static final int
dayOfInteger
(long days) SAS 10.03.2009 Replacement for function 'day-of-integer' in MicroFocusstatic final String
to do ..static final String
to do ..static final int
integerOfDate
(long date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.static final int
integerOfDate
(String date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.static final int
integerOfDay
(long date) SAS 11.03.2009static final long
integerPart
(double value) translation of IBM Function IntegerPart ABCDstatic final long
integerPart
(long value) translation of IBM Function IntegerPart ABCDstatic final boolean
check the content of field is a numberstatic final boolean
check the content of field is a numberstatic final boolean
isAlphaNumeric
(ISMObject field) static final boolean
isEbcidicNumber
(ISMObject field) check the content of field is a numberstatic final boolean
check whether field is in rangestatic final boolean
check whether field is in range from FROM to TOstatic final boolean
static final boolean
check whether field is in range from FROM to TOstatic final boolean
isLowercase
(ISMObject field) check whether string is in lower casestatic final boolean
isLowercase
(String str) static final boolean
isNumber
(double field) check the content of field is a numberstatic final boolean
check the content of a record is a numberstatic final boolean
check the content of field is a numberstatic final boolean
check the content of field is a numberstatic final boolean
isUppercase
(ISMObject field) check whether string is in upper casestatic final boolean
isUppercase
(String str) static final String
nationalOf
(String value) to do ..static int
Translation of COBOL INTRINSIC FUNCTION ORD.static final String
static final String
replaceUnderlines
(String src) Used internally by SoftwareMining Framework replace '_' with '-'static final String
trimToSize
(String toTrim, char filler, int length, boolean left)
-
Constructor Details
-
CBLUtil
public CBLUtil()
-
-
Method Details
-
isEbcidicNumber
check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isNumber
public static final boolean isNumber(double field) check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isNumber
check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isNumber
check the content of a record is a number- Parameters:
wrapper
- : the record (CBLBean)- Returns:
- - true if number
-
isNumber
check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isAlpha
check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isAlpha
check the content of field is a number- Parameters:
field
-- Returns:
- - true if number
-
isAlphaNumeric
-
dateOfInteger
public static final int dateOfInteger(long days) Replacement for function 'date-of-integer' converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).- Parameters:
days
- - positive integer that represents a number of days succeeding December 31, 1600, in the Gregorian calendar. The valid range is 1 to 3,067,671, which corresponds to dates ranging from January 1, 1601 thru December 31, 9999.- Returns:
- - an integer of the form YYYYMMDD where YYYY represents a year in the Gregorian calendar; MM represents the month of that year; and DD represents the day of that month.
-
dateOfIntegerAsStr
-
integerOfDay
public static final int integerOfDay(long date) SAS 11.03.2009- Returns:
- returns number of days since December 31, 1600 for the date DATE.
-
dayOfInteger
public static final int dayOfInteger(long days) SAS 10.03.2009 Replacement for function 'day-of-integer' in MicroFocus -
integerOfDate
public static final int integerOfDate(long date) Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.- Parameters:
date
- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD, where: YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999. MM represents a month and must be a positive integer less than 13. DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.date
-- Returns:
- - The returned value is an integer that is the number of days that the date represented by argument-1 succeeds December 31, 1600 in the Gregorian calendar.
-
integerOfDate
Replacement for function 'integer-of-date' in MicroFocus The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.- Parameters:
date
- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD, where: YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999. MM represents a month and must be a positive integer less than 13. DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.- Returns:
- - The returned value is an integer that is the number of days that the date represented by argument-1 succeeds December 31, 1600 in the Gregorian calendar.
-
replaceUnderlines
Used internally by SoftwareMining Framework replace '_' with '-' -
pad
-
trimToSize
-
capitalize
- Parameters:
name
-- Returns:
-
integerPart
public static final long integerPart(double value) translation of IBM Function IntegerPart ABCD- Parameters:
field
-- Returns:
- - true if number
-
integerPart
public static final long integerPart(long value) translation of IBM Function IntegerPart ABCD- Parameters:
field
-- Returns:
- - true if number
-
isInRange
check whether field is in range- Parameters:
field
-range
-- Returns:
- - true if range contains field's value as a string
-
isInRange
-
isInRange
check whether field is in range from FROM to TO- Parameters:
field
-from
-to
-- Returns:
- - true if field's value is lexicographically between FROM and TO
-
isInRange
check whether field is in range from FROM to TO- Parameters:
from
-to
-field
-- Returns:
- - true if field's value is lexicographically between FROM and TO
-
isUppercase
check whether string is in upper case- Parameters:
field
-- Returns:
- - true if range contains field's value as a string
-
isUppercase
-
isLowercase
check whether string is in lower case- Parameters:
field
-- Returns:
- - true if range contains field's value as a string
-
isLowercase
-
nationalOf
to do ..
Translation of NATIONAL-OF Function- Parameters:
value
-- Returns:
-
displayOf
to do ..
Translation of DISPLAY-OF Function- Parameters:
value
-- Returns:
-
displayOf
to do ..
Translation of DISPLAY-OF Function- Parameters:
value
-- Returns:
-
ord
Translation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
inputStr
-- Returns:
-
charValue
Translation of COBOL INTRINSIC FUNCTION ORD.- Parameters:
inputStr
-- Returns:
-