com.realtime.crossfire.jxclient.util
Class StringSplitter

java.lang.Object
  extended by com.realtime.crossfire.jxclient.util.StringSplitter

public class StringSplitter
extends java.lang.Object

Utility class for splitting strings.


Field Summary
private static int MAXIMUM_LINE_LENGTH
          The maximum line length in characters.
private static int PREFERRED_LINE_LENGTH
          The preferred line length in characters.
 
Constructor Summary
private StringSplitter()
          Private constructor to prevent instantiation.
 
Method Summary
private static java.lang.Iterable<java.lang.String> split(java.lang.String message)
          Splits the given string into lines.
static java.lang.String splitAsHtml(java.lang.String message)
          Splits the given string into lines and returns the lines separated by "<br>".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_LINE_LENGTH

private static final int MAXIMUM_LINE_LENGTH
The maximum line length in characters.

See Also:
Constant Field Values

PREFERRED_LINE_LENGTH

private static final int PREFERRED_LINE_LENGTH
The preferred line length in characters.

See Also:
Constant Field Values
Constructor Detail

StringSplitter

private StringSplitter()
Private constructor to prevent instantiation.

Method Detail

split

@NotNull
private static java.lang.Iterable<java.lang.String> split(@NotNull
                                                                  java.lang.String message)
Splits the given string into lines.

Parameters:
message - the message to split
Returns:
the lines

splitAsHtml

@NotNull
public static java.lang.String splitAsHtml(@NotNull
                                                   java.lang.String message)
Splits the given string into lines and returns the lines separated by "<br>".

Parameters:
message - the message to format
Returns:
the formatted message