Synchronized List for inserts/removes. More...
Public Member Functions | |
void | add (T value) |
Synchronized insert into collection at the end of the list. More... | |
void | clear () |
Clears the list. More... | |
long | getCount () |
Gets the count of items in the list. More... | |
T[] | getValues () |
Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues. More... | |
void | insert (int index, T value) |
Synchronized insert into collection at a given index. More... | |
void | remove (T value) |
Synchronized remove from collection. More... | |
void | removeAt (int index) |
Synchronized remove from collection at a specified index. More... | |
Protected Member Functions | |
FrequentReadSynchronizedList () | |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList. More... | |
FrequentReadSynchronizedList (Object lockObject) | |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList. More... | |
abstract T[] | getArray (int count) |
Gets an array of a given type of a given length. More... | |
Synchronized List for inserts/removes.
Unsynchronized for reads. Optimized for frequent reads relative to writes.
|
protected |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList.
|
protected |
Creates an instance of a fm.liveswitch.FrequentReadSynchronizedList.
lockObject | Synchronization object. |
void fm.liveswitch.FrequentReadSynchronizedList< T >.add | ( | T | value | ) |
Synchronized insert into collection at the end of the list.
value | Value |
void fm.liveswitch.FrequentReadSynchronizedList< T >.clear | ( | ) |
Clears the list.
|
abstractprotected |
Gets an array of a given type of a given length.
count | The count. |
long fm.liveswitch.FrequentReadSynchronizedList< T >.getCount | ( | ) |
Gets the count of items in the list.
T [] fm.liveswitch.FrequentReadSynchronizedList< T >.getValues | ( | ) |
Gets the values in the collection not subject to synchronization and Concurrent Modification/Access issues.
May be missing newly added or removed values.
void fm.liveswitch.FrequentReadSynchronizedList< T >.insert | ( | int | index, |
T | value | ||
) |
Synchronized insert into collection at a given index.
value | Value |
index | Index |
void fm.liveswitch.FrequentReadSynchronizedList< T >.remove | ( | T | value | ) |
Synchronized remove from collection.
value | Value |
void fm.liveswitch.FrequentReadSynchronizedList< T >.removeAt | ( | int | index | ) |
Synchronized remove from collection at a specified index.
index | Index |