Package oracle.rules.rl.extensions
Class RL
java.lang.Object
oracle.rules.rl.extensions.RL
Extended RL builtins (for W3C RIF support)
-
Method Summary
Modifier and TypeMethodDescriptionstatic ListAppend items to a liststatic intstatic Listconcatenate(List... list) Concatenate listsstatic ListdistinctValues(List list) Remove duplicates.static Stringstatic Stringstatic ListReturns a list which contains exactly those items which are in list1 and not in list2.static ObjectGet the i-th element of a List (0 based)Returns the ascending list of all integers, i>=0, such that list.get(i).equals(item).static ListinsertBefore(List list, int pos, Object item) Insert item before pos-th item in list.static ListIntersect lists.static Stringstatic booleanstatic booleanstatic booleanhexBinary (byte[])static booleanstatic booleanstatic booleanisLanguage(String s) static booleanIs the object a literal value?static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic ListMake a list from the argumentsstatic ListRemove pos-th item from list.static ListReverse the liststatic StringstringJoin(String... pieces) Concatenate first n-1 pieces using the last piece as a separator.static StringReturn suffix of s beginning at start char.static StringReturn substring of s from start for length chars.static StringsubstringAfter(String s, String p) static StringsubstringBefore(String s, String p) static ListUnion lists.
-
Method Details
-
isLiteral
Is the object a literal value? This is only an approximation. Note that not all of these are implemented with immutable classes. Best practice is to treat them as immutable. -
list
Make a list from the arguments- Parameters:
item- 0 or more Objects- Returns:
- unmodifiable List
-
get
Get the i-th element of a List (0 based)- Parameters:
list- the list to get an element fromi- 0 based position, if negative, count from end of list- Returns:
- element
-
append
Append items to a list- Parameters:
list- the list to append toitem- 0 or more Objects- Returns:
- unmodifiable List
-
concatenate
Concatenate lists- Parameters:
list- the lists to concatenate- Returns:
- unmodifiable List
-
insertBefore
Insert item before pos-th item in list. Index starts at 0. pos may be negative, meaning count from end of list.- Parameters:
list-pos-item-- Returns:
- unmodifiable List
-
remove
Remove pos-th item from list. pos may be negative, meaning count from end of list.- Parameters:
list-pos-- Returns:
- unmodifiable List
-
reverse
Reverse the list- Parameters:
list-- Returns:
- unmodifiable List
-
indexOf
Returns the ascending list of all integers, i>=0, such that list.get(i).equals(item).- Parameters:
list-item-- Returns:
- List of Integer
-
union
Union lists. Concatenate and remove duplicates. Respect order.- Parameters:
list- the lists to union- Returns:
- unmodifiable List
-
intersect
Intersect lists. Retain elements common to all. Respect order of first arg.- Parameters:
list- the lists to intersect- Returns:
- unmodifiable List
-
distinctValues
Remove duplicates. Respect order.- Parameters:
list- with possible duplicates- Returns:
- unmodifiable List with no duplicates
-
except
Returns a list which contains exactly those items which are in list1 and not in list2. The order of the items is the same as in list1.- Parameters:
list1-list2-- Returns:
-
isDecimal
-
isInteger
-
isLong
-
isInt
-
isShort
-
isByte
-
isNonNegativeInteger
-
isPositiveInteger
-
isUnsignedLong
-
isUnsignedInt
-
isUnsignedShort
-
isUnsignedByte
-
isNonPositiveInteger
-
isNegativeInteger
-
isHexBinary
hexBinary (byte[]) -
substring
Return substring of s from start for length chars. Differs from java String.substring in that the first char is 1 and length is used instead of the end char index.- Parameters:
s-start-length-- Returns:
- String
-
substring
Return suffix of s beginning at start char. Differs from java String.substring in that the first char is 1.- Parameters:
s-start-- Returns:
- String
-
stringJoin
Concatenate first n-1 pieces using the last piece as a separator. E.g. stringJoin("a","b","c","#") == "a#b#c"- Parameters:
pieces-- Returns:
- String
-
encodeForURI
-
iriToUri
- Throws:
URISyntaxException
-
escapeHtmlUri
-
substringBefore
-
substringAfter
-
isNormalizedString
-
isToken
-
isLanguage
-
isName
-
isNCName
-
isNMTOKEN
-
compare
-