alma::acs::commandcenter::util::StringRingBuffer Class Reference

List of all members.

Public Member Functions

 StringRingBuffer (int size)
int add (char obj)
int size ()
char[] getAll ()
boolean equals (String other)
String toString ()

Protected Attributes

char[] data
int next = 0
boolean isFillingUp = true

Private Member Functions

char[] copyToNewArray (int size)
int inc (int i)

Detailed Description

Author:
mschilli

Constructor & Destructor Documentation

alma::acs::commandcenter::util::StringRingBuffer::StringRingBuffer ( int  size  )  [inline]

------------------- API ------------------------ ///

References data.


Member Function Documentation

int alma::acs::commandcenter::util::StringRingBuffer::add ( char  obj  )  [inline]

Returns the element that gets overwritten by this add-operation, -1 if none is overwritten since the RingBuffer is still filling up (that is, isFillingUp is true.

References data, inc(), isFillingUp, and next.

Referenced by alma::acs::commandcenter::util::UtilsTest::testStringRingBuffer(), and alma::acs::commandcenter::engine::Executor::LocalInProcStream::write().

char [] alma::acs::commandcenter::util::StringRingBuffer::copyToNewArray ( int  size  )  [inline, private]

----------------- Internal --------------------- ///

References data, isFillingUp, and next.

Referenced by getAll().

boolean alma::acs::commandcenter::util::StringRingBuffer::equals ( String  other  )  [inline]
char [] alma::acs::commandcenter::util::StringRingBuffer::getAll (  )  [inline]

References copyToNewArray(), data, and size().

Referenced by toString().

int alma::acs::commandcenter::util::StringRingBuffer::inc ( int  i  )  [inline, private]

References data.

Referenced by add().

int alma::acs::commandcenter::util::StringRingBuffer::size (  )  [inline]

References data, isFillingUp, and next.

Referenced by equals(), and getAll().

String alma::acs::commandcenter::util::StringRingBuffer::toString (  )  [inline]

References getAll().


Member Data Documentation

Referenced by add(), copyToNewArray(), equals(), and size().

Referenced by add(), copyToNewArray(), equals(), and size().


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

Generated by  doxygen 1.6.2