org.jostraca.util
Class TextSegmenter

java.lang.Object
  extended byorg.jostraca.util.TextSegmenter
All Implemented Interfaces:
Standard

public class TextSegmenter
extends java.lang.Object
implements Standard

Segment a String into marked segments. A segment is marked with a start and end String. Example: foo[bar]baz[bee]bob, marked with [ and ] has the segments bar and bee.


Field Summary
 
Fields inherited from interface org.jostraca.util.Standard
BACKSLASH, CHAR_BACKSLASH, CHAR_CLOSE_SQUARE_BRACKET, CHAR_COLON, CHAR_COMMA, CHAR_DOT, CHAR_EQUALS, CHAR_FORWARDSLASH, CHAR_GREATERTHAN, CHAR_LESSTHAN, CHAR_MINUS, CHAR_NEWLINE, CHAR_OPEN_SQUARE_BRACKET, CHAR_PERCENT, CHAR_QUOTE, CHAR_RETURN, CHAR_SEMICOLON, CHAR_SPACE, CHAR_TAB, CHAR_ZERO, CLOSE_BRACE, CLOSE_BRACKET, CLOSE_SQUARE_BRACKET, COLON, COLON_OPEN_SQUARE_BRACKET, COLON_SPACE, COMMA, COMMA_SPACE, Directive, DOT, DOT_PROPERTIES, DOTDOT, EMPTY, EMPTY_STRING_ARRAY, EMPTY_STRINGBUFFER, EQUALS, Expression, FORWARDSLASH, GREATERTHAN, INDENT, Insert, IS_NULL, LESSTHAN, MINUS, NEWLINE, NO, OPEN_BRACE, OPEN_BRACKET, OPEN_SQUARE_BRACKET, PERCENT, QUOTE, Script, SEMICOLON, SPACE, TAB, Text, UNDEFINED, UNKNOWN, UTIL_TRACKER, YES, ZERO
 
Constructor Summary
TextSegmenter(java.lang.String pContent, java.lang.String pStart, java.lang.String pEnd)
           
 
Method Summary
 java.lang.String getReplacedContent()
           
 boolean hasMoreSegments()
           
 java.lang.String nextSegment()
           
 void replaceSegment(java.lang.String pReplacement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSegmenter

public TextSegmenter(java.lang.String pContent,
                     java.lang.String pStart,
                     java.lang.String pEnd)
Method Detail

hasMoreSegments

public boolean hasMoreSegments()

nextSegment

public java.lang.String nextSegment()

replaceSegment

public void replaceSegment(java.lang.String pReplacement)

getReplacedContent

public java.lang.String getReplacedContent()


Copyright © 2000-2002 Richard Rodger