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) |
| alma::acs::commandcenter::util::StringRingBuffer::StringRingBuffer | ( | int | size | ) | [inline] |
------------------- API ------------------------ ///
References data.
| 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] |
References data, isFillingUp, next, and size().
Referenced by alma::acs::commandcenter::util::UtilsTest::testStringRingBuffer(), and alma::acs::commandcenter::engine::Executor::LocalInProcStream::write().
| 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] |
| int alma::acs::commandcenter::util::StringRingBuffer::size | ( | ) | [inline] |
References data, isFillingUp, and next.
| String alma::acs::commandcenter::util::StringRingBuffer::toString | ( | ) | [inline] |
References getAll().
char [] alma::acs::commandcenter::util::StringRingBuffer::data [protected] |
Referenced by add(), copyToNewArray(), equals(), getAll(), inc(), size(), and StringRingBuffer().
boolean alma::acs::commandcenter::util::StringRingBuffer::isFillingUp = true [protected] |
Referenced by add(), copyToNewArray(), equals(), and size().
int alma::acs::commandcenter::util::StringRingBuffer::next = 0 [protected] |
Referenced by add(), copyToNewArray(), equals(), and size().
1.6.2