

Public Member Functions | |
| IntArray () | |
| IntArray (int capacity) | |
| IntArray (int[] values) | |
| void | ensureCapacity (int capacity) |
| int | size () |
| boolean | isEmpty () |
| void | trimToSize () |
| void | add (int val) |
| void | add (int[] vals) |
| void | add (int[] vals, int offset, int length) |
| void | insert (int offset, int value) |
| void | insert (int offset, int[] values) |
| void | insert (int offset, int[] values, int valOffset, int len) |
| int | get (int offset) |
| void | set (int offset, int val) |
| void | set (int offset, int[] values) |
| void | set (int offset, int[] values, int valOffset, int length) |
| void | clear () |
| void | clear (int capacity) |
| int | removeAt (int offset) |
| int | remove (int value) |
| void | removeAt (int offset, int length) |
| Object | clone () |
| int[] | toArray () |
| int[] | toArray (int offset, int len) |
| void | toArray (int[] dest, int offset, int len) |
| boolean | equals (Object other) |
| int | hashCode () |
| boolean | contains (int value) |
| String | toString () |
Protected Attributes | |
| transient int[] | data |
Private Member Functions | |
| void | writeObject (ObjectOutputStream stream) throws IOException |
| void | readObject (ObjectInputStream stream) throws IOException, ClassNotFoundException |
Private Attributes | |
| transient int | pos |
Static Private Attributes | |
| static final long | serialVersionUID = -8356201427005323616L |
| static final int | DEFAULT_CAPACITY = 10 |
A resizable, array of integer primitives.
| com::cosylab::acs::maci::IntArray::IntArray | ( | ) | [inline] |
Constrcuts a new IntArray instance with the default capacity.
References DEFAULT_CAPACITY.
| com::cosylab::acs::maci::IntArray::IntArray | ( | int | capacity | ) | [inline] |
| com::cosylab::acs::maci::IntArray::IntArray | ( | int[] | values | ) | [inline] |
Constrcuts a new IntArray instance whose capacity is the greater of the length of values and DEFAULT_CAPACITY and whose initial contents are the specified values.
| values | an int[] value |
References add(), and DEFAULT_CAPACITY.
| void com::cosylab::acs::maci::IntArray::add | ( | int[] | vals, | |
| int | offset, | |||
| int | length | |||
| ) | [inline] |
Adds a subset of the values in the array vals to the end of the list, in order.
| vals | an int[] value | |
| offset | the offset at which to start copying | |
| length | the number of values to copy. |
References data, ensureCapacity(), and pos.
| void com::cosylab::acs::maci::IntArray::add | ( | int[] | vals | ) | [inline] |
Adds the values in the array vals to the end of the list, in order.
| vals | an int[] value |
References add().
| void com::cosylab::acs::maci::IntArray::add | ( | int | val | ) | [inline] |
Adds val to the end of the list, growing as needed.
| val | an int value |
References data, ensureCapacity(), and pos.
Referenced by add(), com::cosylab::acs::maci::manager::recovery::ContainerInfoCommandComponentAdd::execute(), com::cosylab::acs::maci::manager::recovery::ComponentInfoCommandComponentAdd::execute(), com::cosylab::acs::maci::manager::recovery::ComponentCommandClientAdd::execute(), com::cosylab::acs::maci::manager::recovery::ClientInfoCommandComponentAdd::execute(), insert(), IntArray(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRequestComponent(), com::cosylab::acs::maci::manager::ManagerImpl::registerComponent(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::run(), com::cosylab::acs::maci::test::IntArrayTest::testAddRemoveContains(), com::cosylab::acs::maci::test::IntArrayTest::testAllocation(), com::cosylab::acs::maci::test::IntArrayTest::testContainment(), com::cosylab::acs::maci::test::IntArrayTest::testIntArraySerialization(), and com::cosylab::acs::maci::test::IntArrayTest::testRemoval().
| void com::cosylab::acs::maci::IntArray::clear | ( | int | capacity | ) | [inline] |
| void com::cosylab::acs::maci::IntArray::clear | ( | ) | [inline] |
Flushes the internal state of the list, resetting the capacity to the default.
References DEFAULT_CAPACITY.
| Object com::cosylab::acs::maci::IntArray::clone | ( | ) | [inline] |
| boolean com::cosylab::acs::maci::IntArray::contains | ( | int | value | ) | [inline] |
Searches the list for value
| value | an int value |
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::addComponentOwner(), com::cosylab::acs::maci::manager::ManagerImpl::containerPostLoginActivation(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncReleaseComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRequestComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRestartComponent(), com::cosylab::acs::maci::manager::ManagerImpl::makeComponentImmortal(), com::cosylab::acs::maci::manager::ManagerImpl::registerComponent(), com::cosylab::acs::maci::test::IntArrayTest::testAddRemoveContains(), and com::cosylab::acs::maci::test::ManagerImplTest::testForceReleaseComponent().
| void com::cosylab::acs::maci::IntArray::ensureCapacity | ( | int | capacity | ) | [inline] |
| boolean com::cosylab::acs::maci::IntArray::equals | ( | Object | other | ) | [inline] |
| int com::cosylab::acs::maci::IntArray::get | ( | int | offset | ) | [inline] |
Returns the value at the specified offset.
| offset | an int value |
int value Referenced by com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::test::IntArrayTest::testAllocation(), com::cosylab::acs::maci::test::IntArrayTest::testContainment(), and com::cosylab::acs::maci::test::IntArrayTest::testRemoval().
| int com::cosylab::acs::maci::IntArray::hashCode | ( | ) | [inline] |
| void com::cosylab::acs::maci::IntArray::insert | ( | int | offset, | |
| int[] | values, | |||
| int | valOffset, | |||
| int | len | |||
| ) | [inline] |
Inserts a slice of the array of values into the list at offset. All values including and to the right of offset are shifted to the right.
| offset | an int value | |
| values | an int[] value | |
| valOffset | the offset in the values array at which to start copying. | |
| len | the number of values to copy from the values array |
References add(), data, ensureCapacity(), and pos.
| void com::cosylab::acs::maci::IntArray::insert | ( | int | offset, | |
| int[] | values | |||
| ) | [inline] |
Inserts the array of values into the list at offset. All values including and to the right of offset are shifted to the right.
| offset | an int value | |
| values | an int[] value |
References insert().
| void com::cosylab::acs::maci::IntArray::insert | ( | int | offset, | |
| int | value | |||
| ) | [inline] |
Inserts value into the list at offset. All values including and to the right of offset are shifted to the right.
| offset | an int value | |
| value | an int value |
References add(), data, ensureCapacity(), and pos.
Referenced by insert().
| boolean com::cosylab::acs::maci::IntArray::isEmpty | ( | ) | [inline] |
Tests whether this list contains any values.
References pos.
Referenced by com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::extract().
| void com::cosylab::acs::maci::IntArray::readObject | ( | ObjectInputStream | stream | ) | throws IOException, ClassNotFoundException [inline, private] |
| int com::cosylab::acs::maci::IntArray::remove | ( | int | value | ) | [inline] |
Removes the element with value value from the list.
| value | value of the element to be removed |
References data, pos, and removeAt().
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge(), com::cosylab::acs::maci::manager::recovery::ContainerInfoCommandComponentRemove::execute(), com::cosylab::acs::maci::manager::recovery::ComponentInfoCommandComponentRemove::execute(), com::cosylab::acs::maci::manager::recovery::ComponentCommandClientRemove::execute(), com::cosylab::acs::maci::manager::recovery::ClientInfoCommandComponentRemove::execute(), and com::cosylab::acs::maci::test::IntArrayTest::testAddRemoveContains().
| void com::cosylab::acs::maci::IntArray::removeAt | ( | int | offset, | |
| int | length | |||
| ) | [inline] |
| int com::cosylab::acs::maci::IntArray::removeAt | ( | int | offset | ) | [inline] |
Removes the value at offset from the list.
| offset | an int value |
Referenced by remove(), com::cosylab::acs::maci::test::IntArrayTest::testContainment(), and com::cosylab::acs::maci::test::IntArrayTest::testRemoval().
| void com::cosylab::acs::maci::IntArray::set | ( | int | offset, | |
| int[] | values, | |||
| int | valOffset, | |||
| int | length | |||
| ) | [inline] |
Replace the values in the list starting at offset with length values from the values array, starting at valOffset.
| offset | the first offset to replace | |
| values | the source of the new values | |
| valOffset | the first value to copy from the values array | |
| length | the number of values to copy |
| void com::cosylab::acs::maci::IntArray::set | ( | int | offset, | |
| int[] | values | |||
| ) | [inline] |
Replace the values in the list starting at offset with the contents of the values array.
| offset | the first offset to replace | |
| values | the source of the new values |
| void com::cosylab::acs::maci::IntArray::set | ( | int | offset, | |
| int | val | |||
| ) | [inline] |
| int com::cosylab::acs::maci::IntArray::size | ( | ) | [inline] |
Returns the number of values in the list.
References pos.
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::conditionalShutdownContainer(), com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge(), equals(), com::cosylab::acs::maci::manager::ManagerImpl::internalDeactivateComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncReleaseComponent(), readObject(), com::cosylab::acs::maci::manager::ManagerImpl::ShutdownContainerTask::run(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::run(), com::cosylab::acs::maci::test::IntArrayTest::testAllocation(), com::cosylab::acs::maci::test::IntArrayTest::testContainment(), com::cosylab::acs::maci::test::ManagerImplTest::testForceReleaseComponent(), com::cosylab::acs::maci::test::IntArrayTest::testRemoval(), and trimToSize().
| void com::cosylab::acs::maci::IntArray::toArray | ( | int[] | dest, | |
| int | offset, | |||
| int | len | |||
| ) | [inline] |
| int [] com::cosylab::acs::maci::IntArray::toArray | ( | int | offset, | |
| int | len | |||
| ) | [inline] |
Copies a slice of the list into a native array.
| offset | the offset at which to start copying | |
| len | the number of values to copy. |
int[] value References toArray().
| int [] com::cosylab::acs::maci::IntArray::toArray | ( | ) | [inline] |
Copies the contents of the list into a native array.
int[] value References pos.
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::administratorLogout(), com::cosylab::acs::maci::manager::ManagerImpl::clientLogout(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::ComponentInfoVertex::ComponentInfoVertex(), com::cosylab::acs::maci::manager::ManagerImpl::containerInternalStateMerge(), com::cosylab::acs::maci::manager::ManagerImpl::containerLogout(), com::cosylab::acs::maci::manager::ManagerImpl::containerPostLoginActivation(), com::cosylab::acs::maci::manager::ManagerImpl::doCycleCheck(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::extract(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncDeactivateComponent(), com::cosylab::acs::maci::manager::ManagerImpl::internalNoSyncRequestComponent(), com::cosylab::acs::maci::manager::ManagerImpl::makeUnavailable(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::markImmortalChain(), com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::run(), toArray(), and trimToSize().
| String com::cosylab::acs::maci::IntArray::toString | ( | ) | [inline] |
Returns a String representation of the list, front to back.
String value Referenced by com::cosylab::acs::maci::test::IntArrayTest::testContainment().
| void com::cosylab::acs::maci::IntArray::trimToSize | ( | ) | [inline] |
| void com::cosylab::acs::maci::IntArray::writeObject | ( | ObjectOutputStream | stream | ) | throws IOException [inline, private] |
transient int [] com::cosylab::acs::maci::IntArray::data [protected] |
Array data.
Referenced by add(), clear(), clone(), contains(), ensureCapacity(), equals(), get(), hashCode(), insert(), IntArray(), readObject(), remove(), removeAt(), set(), toArray(), toString(), trimToSize(), and writeObject().
final int com::cosylab::acs::maci::IntArray::DEFAULT_CAPACITY = 10 [static, private] |
Default capacity for the array.
Referenced by clear(), and IntArray().
transient int com::cosylab::acs::maci::IntArray::pos [private] |
Index of the first empty bucket (also size).
Referenced by add(), clear(), contains(), equals(), get(), hashCode(), insert(), IntArray(), isEmpty(), readObject(), remove(), removeAt(), set(), size(), toArray(), toString(), and writeObject().
final long com::cosylab::acs::maci::IntArray::serialVersionUID = -8356201427005323616L [static, private] |
Serial version UID.
1.6.2