Back to index

wims  3.65+svn20090927
Public Member Functions | Package Attributes | Private Attributes
rene.util.SimpleStringBuffer Class Reference

List of all members.

Public Member Functions

 SimpleStringBuffer (int size)
 SimpleStringBuffer (char b[])
void append (char c)
void append (String s)
void clear ()
String toString ()

Package Attributes

int N

Private Attributes

int Size
char Buf []

Detailed Description

Definition at line 2 of file SimpleStringBuffer.java.


Constructor & Destructor Documentation

Definition at line 5 of file SimpleStringBuffer.java.

       {      Size=size;
              Buf=new char[size];
              N=0;
       }

Definition at line 10 of file SimpleStringBuffer.java.

       {      Size=b.length;
              Buf=b;
              N=0;
       }

Member Function Documentation

void rene.util.SimpleStringBuffer.append ( char  c) [inline]

Definition at line 15 of file SimpleStringBuffer.java.

       {      if (N<Size) Buf[N++]=c;
              else
              {      Size=2*Size;
                     char NewBuf[]=new char[Size];
                     for (int i=0; i<N; i++) NewBuf[i]=Buf[i];
                     Buf=NewBuf;
                     Buf[N++]=c;
              }
       }

Here is the caller graph for this function:

void rene.util.SimpleStringBuffer.append ( String  s) [inline]

Definition at line 25 of file SimpleStringBuffer.java.

       {      int n=s.length();
              for (int i=0; i<n; i++) append(s.charAt(i));
       }

Here is the call graph for this function:

Definition at line 29 of file SimpleStringBuffer.java.

       {      N=0;
       }

Here is the caller graph for this function:

Definition at line 32 of file SimpleStringBuffer.java.

       {      if (N==0) return "";
              return new String(Buf,0,N);
       }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 4 of file SimpleStringBuffer.java.

Definition at line 3 of file SimpleStringBuffer.java.

Definition at line 3 of file SimpleStringBuffer.java.


The documentation for this class was generated from the following file: