Package com.softwaremining.util
Class CBLFieldUtility
java.lang.Object
com.softwaremining.util.CBLFieldUtility
utilities used internally by SoftwareMining framework
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidcollectPrimitives(ArrayList<ISMObject> storage, ISMObject field) add "field" parameter to the arrayList (storage.add(field)) ...static final intcompare(double double1, double double2) static final intstatic final intstatic final intstatic final intstatic final intmethod used in 88 variable comparisonsstatic final intstatic final intcompare(ISMObject field1, BigDecimal double2) static final intstatic final intstatic final intMakes sure that the strings have equal padding, then uses Java compareTo Method: A String is less than another if it comes before the other in dictionary order.static final booleanTest for Equalitystatic final ISMObject[]getDelegateKeys(ISMObject[] fields, ISQLWrapper delegateClass) static final booleanisGreaterOrEqualTo(String value, String value1) compare values of this field with the target fieldstatic final booleanisGreaterThan(String value, String value1) compare values of this field with the target fieldstatic final booleanisLessOrEqualTo(String value, String value1) compare values of this field with the target fieldstatic final booleanisLessThan(String value, String value1) compare values of this field with the target fieldstatic final booleancheck that the string contains only INTEGER values or a decimal point This means that the value "1234E12" is NOT a Number
NOTE The method is used for validation of stringified FIELDS (ie produced by retrieveAsString()).static final ISMObject[]toPrimitives(ISMObject field) Convert a CBLGroup to its primitive FieldPrimitives: ie CBLString, CBLInteger, ....static final ISMObject[]toPrimitives(ISMObject[] fields) Convert a CBLGroup to its primitive FieldPrimitives: ie CBLString, CBLInteger, ....static final ISMObject[]toPrimitives(ISMObject theFieldOrGroup, ISMObject[] existingItems) Add an primitive fields from theFieldOrGroup to the list of existingItemsstatic final Stringright trim the string ...
-
Field Details
-
log
-
totalRuntime_including_getFillStr
public static long totalRuntime_including_getFillStrfor internal use only ... profiling information
-
-
Constructor Details
-
CBLFieldUtility
public CBLFieldUtility()
-
-
Method Details
-
toPrimitives
Convert a CBLGroup to its primitive FieldPrimitives: ie CBLString, CBLInteger, .... Fields of any Subgroups will also be included.- Parameters:
field-- Returns:
-
toPrimitives
Add an primitive fields from theFieldOrGroup to the list of existingItems- Returns:
-
toPrimitives
Convert a CBLGroup to its primitive FieldPrimitives: ie CBLString, CBLInteger, .... Fields of any Subgroups will also be included.- Returns:
-
getDelegateKeys
-
collectPrimitives
add "field" parameter to the arrayList (storage.add(field)) ... but if "field" was a group, then add the "fields" within the group- Parameters:
storage-field-
-
compare
method used in 88 variable comparisons- Parameters:
field1-field2-- Returns:
- result is same as java "compareTo" method on the fields.
-
compare
-
compare
-
compare
-
compare
public static final int compare(double double1, double double2) -
compare
-
compare
-
compare
Makes sure that the strings have equal padding, then uses Java compareTo Method: A String is less than another if it comes before the other in dictionary order.- Parameters:
s1- - comparison string-1s2- - comparison string-1- Returns:
-
compare
-
compare
-
compare
-
isNumber
check that the string contains only INTEGER values or a decimal point This means that the value "1234E12" is NOT a Number
NOTE The method is used for validation of stringified FIELDS (ie produced by retrieveAsString()). Therefore, the inputString will NOT be in scientific notation.- Parameters:
inputString- -- Returns:
- - true if inputString contains only digits or decimal point (not scientific notation 'E').
-
equals
Test for Equality -
isGreaterThan
compare values of this field with the target field- Parameters:
value-- Returns:
-
isGreaterOrEqualTo
compare values of this field with the target field- Parameters:
value-- Returns:
-
isLessThan
compare values of this field with the target field- Parameters:
value-- Returns:
-
isLessOrEqualTo
compare values of this field with the target field- Parameters:
value-- Returns:
-
trimRight
right trim the string ... used in comparisons such as EQUALS or IS GREATER THAN- Parameters:
inputString-- Returns:
-