Adds a Collection of Strings to the MDAG.

@param strCollection a {@link java.util.Collection} containing Strings to be added to the MDAG
556670
public final void addStrings(Collection<String> strCollection)
    {
        if (sourceNode != null)
        {
            String previousString = "";

            //Add all the Strings in strCollection to the MDAG.
            for (String currentString : strCollection)
            {
                int mpsIndex = calculateMinimizationProcessingStartIndex(previousString, currentString);

                //If the _transition path of the previousString needs to be examined for minimization or
                //equivalence class representation after a certain point, call replaceOrRegister to do so.
                if (mpsIndex != -1)
                {

                    String transitionSubstring = previousString.substring(0, mpsIndex);
                    String minimizationProcessingSubString = previousString.substring(mpsIndex);
                    replaceOrRegister(sourceNode.transition(transitionSubstring), minimizationProcessingSubString);
                }
                /////

                addStringInternal(currentString);
                previousString = currentString;
            }
            /////

            //Since we delay the minimization of the previously-added String
            //until after we read the next one, we need to have a seperate
            //statement to minimize the absolute last String.
            replaceOrRegister(sourceNode, previousString);
        }
        else
        {
            unSimplify();
            addStrings(strCollection);
        }
    }
180265
private static void addStringList(CodeBlock.Builder code, List<String> list, String indent) {
    int size = list.size();
    code.add("$T.asList(\n$L", Arrays.class, indent);
    int width = indent.length();
    for (int i = 0; i < size; i++) {
      if (i != 0) {
        code.add(", ");
        width += 2;
      }
      if (width > 80) {
        width = indent.length();
        code.add("\n$L", indent);
      }
      String element = list.get(i);
      code.add("$S", element);
      width += element.length() + 2;
    }
    code.add("\n$L)", indent);
  }
993780
protected void add(final String str) {
        if (str == null) {
            return;
        }

        final int len = str.length();
        int pos = 0;
        while (pos < len) {
            final int remainder = len - pos;
            if (remainder >= 4 && str.charAt(pos) == '^' && str.charAt(pos + 2) == '-') {
                // negated range
                set.add(CharRange.isNotIn(str.charAt(pos + 1), str.charAt(pos + 3)));
                pos += 4;
            } else if (remainder >= 3 && str.charAt(pos + 1) == '-') {
                // range
                set.add(CharRange.isIn(str.charAt(pos), str.charAt(pos + 2)));
                pos += 3;
            } else if (remainder >= 2 && str.charAt(pos) == '^') {
                // negated char
                set.add(CharRange.isNot(str.charAt(pos + 1)));
                pos += 2;
            } else {
                // char
                set.add(CharRange.is(str.charAt(pos)));
                pos += 1;
            }
        }
    }
540653
@Override
	public <E> String serializeCollection(Collection<E> collection, Class<E> objectClazz) {
		if (collection == null)
			return null;

		SegmentedStringWriter source = new SegmentedStringWriter(buffer.get());
		try (SerializerWrapper serializer = createSerializer(source)) {
			mapperFor(objectClazz).serializeCollection(this, serializer, collection);
		} catch (Exception e) {
			e.printStackTrace();
			throw new KriptonRuntimeException(e);
		}
		return source.getAndClear();
	}
1372778
private static void ngramOnCharacter(String data, int[] gramSizes, Collection<String> list) {
    	data = data.replaceAll("\\s+", "");
    	for (int j = 0; j < gramSizes.length; j++) {
            int len = gramSizes[j];
            if (len <= 0 || len > data.length())
                continue;
            for (int i = 0; i < data.length() - len; i++) {
                list.add(data.substring(i, i + len));
            }
        }
    }
1372389
public final void mSTRING() throws RecognitionException {
		try {
			int _type = STRING;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:5: ( ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' ) )
			int alt22=2;
			int LA22_0 = input.LA(1);
			if ( (LA22_0=='\"') ) {
				alt22=1;
			}
			else if ( (LA22_0=='\'') ) {
				alt22=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 22, 0, input);
				throw nvae;
			}

			switch (alt22) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:9: '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"'
					{
					match('\"'); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:13: ( EscapeSequence |~ ( '\\\\' | '\"' ) )*
					loop20:
					while (true) {
						int alt20=3;
						int LA20_0 = input.LA(1);
						if ( (LA20_0=='\\') ) {
							alt20=1;
						}
						else if ( ((LA20_0 >= '\u0000' && LA20_0 <= '!')||(LA20_0 >= '#' && LA20_0 <= '[')||(LA20_0 >= ']' && LA20_0 <= '\uFFFF')) ) {
							alt20=2;
						}

						switch (alt20) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:15: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:32: ~ ( '\\\\' | '\"' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								input.consume();
								state.failed=false;
							}
							else {
								if (state.backtracking>0) {state.failed=true; return;}
								MismatchedSetException mse = new MismatchedSetException(null,input);
								recover(mse);
								throw mse;
							}
							}
							break;

						default :
							break loop20;
						}
					}

					match('\"'); if (state.failed) return;
					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:9: '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\''
					{
					match('\''); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:14: ( EscapeSequence |~ ( '\\\\' | '\\'' ) )*
					loop21:
					while (true) {
						int alt21=3;
						int LA21_0 = input.LA(1);
						if ( (LA21_0=='\\') ) {
							alt21=1;
						}
						else if ( ((LA21_0 >= '\u0000' && LA21_0 <= '&')||(LA21_0 >= '(' && LA21_0 <= '[')||(LA21_0 >= ']' && LA21_0 <= '\uFFFF')) ) {
							alt21=2;
						}

						switch (alt21) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:16: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:33: ~ ( '\\\\' | '\\'' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								input.consume();
								state.failed=false;
							}
							else {
								if (state.backtracking>0) {state.failed=true; return;}
								MismatchedSetException mse = new MismatchedSetException(null,input);
								recover(mse);
								throw mse;
							}
							}
							break;

						default :
							break loop21;
						}
					}

					match('\''); if (state.failed) return;
					}

					if ( state.backtracking==0 ) { setText( normalizeString( getText() ) ); }
					}
					break;

			}
			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1249848
public void addNextString(String string)
    {
        try   {
            m_daOut.writeUTF(string);
        } catch (IOException ex)    {
            ex.printStackTrace();
        }
    }
435122
public static String join(Collection strings, String delimiter) {
        StringBuilder builder = new StringBuilder();
        Iterator<String> iter = strings.iterator();
        while (iter.hasNext()) {
            builder.append(iter.next());
            if (!iter.hasNext()) {
                break;
            }
            builder.append(delimiter);
        }
        return builder.toString();
    }
813724
public void addString(String str)
    {
        if (sourceNode != null)
        {
            addStringInternal(str);
            replaceOrRegister(sourceNode, str);
        }
        else
        {
            unSimplify();
            addString(str);
        }
    }
1287587
@GwtIncompatible("incompatible method")
    public StrBuilder append(final String format, final Object... objs) {
        return append(String.format(format, objs));
    }
30695
private void addText(TextCursor cursor, int limit, ArrayList<MDText> elements) {
        if (cursor.currentOffset < limit) {
            elements.add(new MDRawText(cursor.text.substring(cursor.currentOffset, limit)));
            cursor.currentOffset = limit;
        }
    }
123520
public CacheKeyBuilder appendStringsIgnoringOrder(Collection<String> input)
  {
    appendItem(STRING_LIST_KEY, stringCollectionToByteArray(input, false));
    return this;
  }
1363007
public static String add( String... strings ) {
        int length = 0;
        for ( String str : strings ) {
            if ( str == null ) {
                continue;
            }
            length += str.length();
        }
        CharBuf builder = CharBuf.createExact( length );
        for ( String str : strings ) {
            if ( str == null ) {
                continue;
            }
            builder.add( str );
        }
        return builder.toString();
    }
1091852
public String joinEx(Object collection, String delim, String prefix, String suffix) {
		if (collection == null) {
			return StringUtils.collectionToDelimitedString(Collections.emptyList(), delim, prefix, suffix);
		} else if (collection instanceof Collection) {
			return StringUtils.collectionToDelimitedString((Collection<?>) collection, delim, prefix, suffix);
		} else if (collection.getClass().isArray()) {
			return StringUtils.collectionToDelimitedString(CollectionUtils.arrayToList(collection), delim, prefix, suffix);
		} else {
			return StringUtils.collectionToDelimitedString(Collections.singletonList(collection), delim, prefix, suffix);
		}
	}
248552
public void putString(String strKey, String strValue)
    {
        if (this.getMessageFieldDesc(strKey) != null)
            this.getMessageFieldDesc(strKey).putString(strValue);
        else
            this.putNative(strKey, strValue);
    }
263591
public void addEntry(String placeholder, String... params) {
        ConfigEntry entry = entries.get(placeholder);
        String line = entry.template;

        for (int i = 0; i < params.length; i++) {
            line = line.replace("{" + i + "}", StringUtils.defaultString(params[i]));
        }

        entry.buffer.add(line);
    }
281617
@Override
  public void addToMap(Map<String, String> properties, Map<String, List<Float>> rawHistogramData) {

    // System.out.println(Arrays.toString(properties.entrySet().toArray()));0
    for (Entry<String, String> entrySet : properties.entrySet()) {

      String key = entrySet.getKey();
      String value = entrySet.getValue();

      try {

        Float floatValue = Float.parseFloat(value);
        if (floatValue > -900.0f) {
          List<Float> rawDataForSingleProperty = rawHistogramData.get(key);
          if (rawDataForSingleProperty == null) {
            rawDataForSingleProperty = new ArrayList<Float>();
          }
          rawDataForSingleProperty.add(floatValue);
          rawHistogramData.put(key, rawDataForSingleProperty);
        }
      } catch (NumberFormatException e) {
        // wasn't a float, skip.
      }
    }
  }