Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.adf.model.utils
Class SimpleStringBuffer

java.lang.Object
  extended by oracle.adf.model.utils.SimpleStringBuffer

public final class SimpleStringBuffer
extends java.lang.Object

A non synchronized StringBuffer object that mimmicks the functionality of java.lang.StringBuffer.


Constructor Summary
SimpleStringBuffer()
           
SimpleStringBuffer(int length)
           
SimpleStringBuffer(java.lang.String str)
           
 
Method Summary
 SimpleStringBuffer append(boolean b)
           
 SimpleStringBuffer append(char c)
           
 SimpleStringBuffer append(char[] str)
           
 SimpleStringBuffer append(char[] str, int offset, int len)
           
 SimpleStringBuffer append(double d)
           
 SimpleStringBuffer append(float f)
           
 SimpleStringBuffer append(int i)
           
 SimpleStringBuffer append(long l)
           
 SimpleStringBuffer append(java.lang.Object obj)
           
 SimpleStringBuffer append(java.lang.String str)
           
 int capacity()
          Returns the current capacity of the String buffer.
 char charAt(int index)
           
 SimpleStringBuffer delete(int start, int end)
          Removes the characters in a substring of this SimpleStringBuffer.
 SimpleStringBuffer deleteCharAt(int index)
          Removes the character at the specified position in this SimpleStringBuffer (shortening the SimpleStringBuffer by one character).
 void ensureCapacity(int minimumCapacity)
          Ensures that the capacity of the buffer is at least equal to the specified minimum.
 void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
           
 char[] getValue()
           
 SimpleStringBuffer insert(int offset, boolean b)
           
 SimpleStringBuffer insert(int offset, char c)
           
 SimpleStringBuffer insert(int offset, char[] str)
           
 SimpleStringBuffer insert(int offset, double d)
           
 SimpleStringBuffer insert(int offset, float f)
           
 SimpleStringBuffer insert(int offset, int i)
           
 SimpleStringBuffer insert(int offset, long l)
           
 SimpleStringBuffer insert(int offset, java.lang.Object obj)
           
 SimpleStringBuffer insert(int offset, java.lang.String str)
           
 int length()
          Returns the length (character count) of this string buffer.
 SimpleStringBuffer replace(int start, int end, java.lang.String str)
          Replaces the characters in a substring of this SimpleStringBuffer with characters in the specified String.
 void setCharAt(int index, char ch)
           
 void setLength(int newLength)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleStringBuffer

public SimpleStringBuffer()

SimpleStringBuffer

public SimpleStringBuffer(int length)

SimpleStringBuffer

public SimpleStringBuffer(java.lang.String str)
Method Detail

length

public int length()
Returns the length (character count) of this string buffer.

Returns:
the number of characters in this string buffer.

capacity

public int capacity()
Returns the current capacity of the String buffer. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.

Returns:
the current capacity of this string buffer.

ensureCapacity

public void ensureCapacity(int minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum. If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of: If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.

Parameters:
minimumCapacity - the minimum desired capacity.

setLength

public void setLength(int newLength)

charAt

public char charAt(int index)

getChars

public void getChars(int srcBegin,
                     int srcEnd,
                     char[] dst,
                     int dstBegin)

setCharAt

public void setCharAt(int index,
                      char ch)

append

public SimpleStringBuffer append(java.lang.Object obj)

append

public SimpleStringBuffer append(java.lang.String str)

append

public SimpleStringBuffer append(char[] str)

append

public SimpleStringBuffer append(char[] str,
                                 int offset,
                                 int len)

append

public SimpleStringBuffer append(boolean b)

append

public SimpleStringBuffer append(char c)

append

public SimpleStringBuffer append(int i)

append

public SimpleStringBuffer append(long l)

append

public SimpleStringBuffer append(float f)

append

public SimpleStringBuffer append(double d)

insert

public SimpleStringBuffer insert(int offset,
                                 java.lang.Object obj)

insert

public SimpleStringBuffer insert(int offset,
                                 java.lang.String str)

insert

public SimpleStringBuffer insert(int offset,
                                 char[] str)

insert

public SimpleStringBuffer insert(int offset,
                                 boolean b)

insert

public SimpleStringBuffer insert(int offset,
                                 char c)

insert

public SimpleStringBuffer insert(int offset,
                                 int i)

insert

public SimpleStringBuffer insert(int offset,
                                 long l)

insert

public SimpleStringBuffer insert(int offset,
                                 float f)

insert

public SimpleStringBuffer insert(int offset,
                                 double d)

delete

public SimpleStringBuffer delete(int start,
                                 int end)
Removes the characters in a substring of this SimpleStringBuffer. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the SimpleStringBuffer if no such character exists. If start is equal to end, no changes are made.

Parameters:
start - - the beginning index, inclusive
end - - the ending index, exclusive
Returns:
This simple string buffer
Throws:
java.lang.StringIndexOutOfBoundsException - - if start is negative, greater than length(), or greater than end.

deleteCharAt

public SimpleStringBuffer deleteCharAt(int index)
Removes the character at the specified position in this SimpleStringBuffer (shortening the SimpleStringBuffer by one character).

Parameters:
index - - index of the character to remove
Returns:
This simple string buffer
Throws:
java.lang.StringIndexOutOfBoundsException - - if the index is negative or greater than or equal to length().

replace

public SimpleStringBuffer replace(int start,
                                  int end,
                                  java.lang.String str)
Replaces the characters in a substring of this SimpleStringBuffer with characters in the specified String. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the SimpleStringBuffer if no such character exists. First the characters in the substring are removed and then the specified String is inserted at start. (The SimpleStringBuffer will be lengthened to accommodate the specified String if necessary.)

Parameters:
start - - the beginning index, inclusive
end - - the ending index, exclusive
str - - string that will replace previous contents
Returns:
This simple string buffer
Throws:
java.lang.StringIndexOutOfBoundsException - - if start is negative, greater than length(), or greater than end.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getValue

public char[] getValue()

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

Copyright © 1997, 2011, Oracle. All rights reserved.