AI2 Component
(Version nb184)
|
Static Public Member Functions | |
static String | joinStrings (List< Object > listOfStrings, String separator) |
static String | replaceAllMappingsDictionaryOrder (String text, Map< Object, Object > mappings) |
static String | replaceAllMappingsLongestStringOrder (String text, Map< Object, Object > mappings) |
static String | replaceAllMappingsEarliestOccurrenceOrder (String text, Map< Object, Object > mappings) |
static String | replaceAllMappings (String text, Map< Object, Object > mappings, MappingOrder order) |
Static Public Attributes | |
static final String | LOG_TAG_JOIN_STRINGS = "JavaJoinListOfStrings" |
Java implementation of string utility methods for use in Scheme calls. Used for ease of reasoning about the solution or to address issues with Kawa (e.g. memory problems). See runtime.scm
Definition at line 27 of file JavaStringUtils.java.
|
static |
Java implementation of join-strings since the Kawa version appears to run of space. See runtime.scm
The elements in listOString are Kawa strings, but these are not necessarily Java Strings. They might be FStrings. So we accept a list of Objects and use toString to do a conversion.
Implements the following operation
(define join-strings (strings separator) (JavaJoinListOfStrings:joinStrings strings separator))
I'm writing this in Java, rather than using Kawa in runtime.scm because Kawa seems to blow out memory (or stack?) on small-memory systems and large lists.
Definition at line 189 of file JavaStringUtils.java.
|
static |
Replaces the specified text string with the specified mappings, which is a map containing Key Value pairs where the key is the substring to replace, and the value is the value to replace the substring with. An order parameter is specified to indicate the order of mapping applications.
text | Text to apply mappings to |
mappings | Map containing mappings |
order | Order to use for replacing mappings |
Definition at line 265 of file JavaStringUtils.java.
|
static |
Replaces the specified text string with the specified mappings in dictionary element order.
text | Text to apply mappings to |
mappings | Map containing mappings |
Definition at line 222 of file JavaStringUtils.java.
|
static |
Replaces the specified text string with the specified mappings in earliest occurrence first order.
text | Text to apply mappings to |
mappings | Map containing mappings |
Definition at line 250 of file JavaStringUtils.java.
|
static |
Replaces the specified text string with the specified mappings in longest string first order.
text | Text to apply mappings to |
mappings | Map containing mappings |
Definition at line 236 of file JavaStringUtils.java.
|
static |
Definition at line 158 of file JavaStringUtils.java.