swarm.collections
Interface List
- All Known Implementing Classes:
- ListImpl
- public interface List
- extends Collection, CollectionS, Serialization, SerializationS
Collection of members in an externally assigned linear sequence..
A list is a collection of members that are all maintained at some externally assigned position in a linear sequence of all members. The sequence is established by the position at which members are added: members can be added at the start of list, at the end, or at any point in the middle. A list is also one of the most dynamic of basic collections, in that the cost of adding and removing members is very low. Members can be removed from any position just as easily as they can be added. A list automatically grows and shrinks to reflect the number of members at any one time, and there is no fixed capacity which limits the size to which a list may grow. The List type is supports all messages of Collection. If created with default options, it provides no special speedup of accesses by integer offset.
Method Summary |
void |
addFirst(java.lang.Object anObject)
The addFirst: message adds a new member to the front of the list. |
void |
addLast(java.lang.Object anObject)
The addLast: message adds a new member to the end of the list. |
ListIndex |
listBegin(Zone aZone)
Returns a ListIndex, the special index for the List type |
java.lang.Object |
removeFirst()
Removes the first member from the list and returns it. |
java.lang.Object |
removeLast()
Removes the last member from the list and returns it. |
Methods inherited from interface swarm.defobj.Serialization |
hdf5OutDeep,
hdf5OutShallow,
lispOutDeep,
lispOutShallow,
lispOutVars$deep,
lispSaveStream$Boolean$Value,
lispSaveStream$Char$Value,
lispSaveStream$Double$Value,
lispSaveStream$Float$Value,
lispSaveStream$Integer$Value,
lispSaveStream$Long$Value,
lispSaveStream$LongLong$Value,
lispSaveStream$Short$Value,
lispSaveStream$Unsigned$Value,
lispSaveStream$UnsignedLong$Value,
lispSaveStream$UnsignedLongLong$Value,
lispSaveStream$UnsignedShort$Value,
updateArchiver |
Methods inherited from interface swarm.defobj.Drop |
drop |
Methods inherited from interface swarm.defobj.DefinedObject |
compare,
describe,
describeID,
getDisplayName,
getTypeName,
getZone,
perform,
perform$with,
perform$with$with,
perform$with$with$with,
respondsTo,
setDisplayName,
xfprint,
xfprintid,
xprint,
xprintid |
addFirst
public void addFirst(java.lang.Object anObject)
- The addFirst: message adds a new member to the front of the list.
addLast
public void addLast(java.lang.Object anObject)
- The addLast: message adds a new member to the end of the list.
removeFirst
public java.lang.Object removeFirst()
- Removes the first member from the list and returns it.
removeLast
public java.lang.Object removeLast()
- Removes the last member from the list and returns it.
listBegin
public ListIndex listBegin(Zone aZone)
- Returns a ListIndex, the special index for the List type