xbn.string
Class FLRString

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.util.ForLineRetrieval
              |
              +--xbn.string.FLRString

public class FLRString
extends ForLineRetrieval

A ForLineRetrieval where the source text comes from a String.

Source code:  FLRString.java.  Example code  See the similar example code for FLRFile.


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
FLRString(String s_text)
          Create a FLRString.
FLRString(StringBuffer sb_text)
          Create a FLRString.
FLRString(String s_lineSep, String s_text)
          Create a FLRString.
FLRString(String s_lineSep, StringBuffer sb_text)
          Create a FLRString.
 
Method Summary
 StringBuffer getNextLine()
          Get the next line from the source string.
 StringBuffer getRemainingSB()
          Get the entire StringBuffer not-yet-retrieved.
 boolean hasMoreLines()
          Are there more lines to be retrieved?.
 
Methods inherited from class xbn.util.ForLineRetrieval
getLineNumberNext, getLineNumberPrev, getLineSeparator, getLineSepLength, incLineNumber
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FLRString

public FLRString(String s_text)

Create a FLRString.

Equal to FLRString(sLINE_SEP, s_text)


FLRString

public FLRString(String s_lineSep,
                 String s_text)

Create a FLRString.

The first line of this constructor calls ForLineRetrieval(s_lineSep)

Parameters:
s_text - The actual source text. May not be null.

FLRString

public FLRString(StringBuffer sb_text)

Create a FLRString.

Equal to FLRString(sLINE_SEP, sb_text)


FLRString

public FLRString(String s_lineSep,
                 StringBuffer sb_text)

Create a FLRString.

The first line of this constructor calls ForLineRetrieval(s_lineSep)

Parameters:
sb_text - The actual source text. May not be null.
Method Detail

getRemainingSB

public final StringBuffer getRemainingSB()

Get the entire StringBuffer not-yet-retrieved. This does not affect the string's value.


getNextLine

public StringBuffer getNextLine()

Get the next line from the source string. If all lines have been retrieved (if hasMoreLines equals false), then return null.

Overrides:
getNextLine in class ForLineRetrieval

hasMoreLines

public boolean hasMoreLines()

Are there more lines to be retrieved?.

Overrides:
hasMoreLines in class ForLineRetrieval
Returns:
([internally-held StringBuffer].length() > 0)



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo