com.im.commons 5.9

com.im.commons.util
Interface DataConvertorOptions.Str

Enclosing class:
DataConvertorOptions

public static interface DataConvertorOptions.Str


Method Summary
 int getDoNotAppendIfLessThan()
           
 String getMessageToAppend()
           
 int getTruncateTo()
           
 String process(String s, List<String> messages)
          Perform the truncation using the current settings
 void setDoNotAppendIfLessThan(int chars)
          Do not append the message if the length of the string is less than this number of characters.
 void setMessageToAppend(String msg)
          Append this message to the end of the string if truncation occurred.
 void setTruncateTo(int chars)
          Truncate the string so that it is no longer than this number of characters.
 

Method Detail

setTruncateTo

void setTruncateTo(int chars)
Truncate the string so that it is no longer than this number of characters. A negative value means do not truncate

Parameters:
chars -

getTruncateTo

int getTruncateTo()

setMessageToAppend

void setMessageToAppend(String msg)
Append this message to the end of the string if truncation occurred. The message contributes to the length of the String. e.g. if a message is provided more will be truncated. Leave as null is no message is wanted.

Parameters:
msg -

getMessageToAppend

String getMessageToAppend()

setDoNotAppendIfLessThan

void setDoNotAppendIfLessThan(int chars)
Do not append the message if the length of the string is less than this number of characters.

Parameters:
chars -

getDoNotAppendIfLessThan

int getDoNotAppendIfLessThan()

process

String process(String s,
               List<String> messages)
Perform the truncation using the current settings


com.im.commons 5.9