Метод | Описание | |
---|---|---|
SubVector ( IPersistentMap meta, IPersistentVector v, int start, int end ) : System |
Initialize a subvector, with the given metadata and start/end indices.
|
|
assocN ( int i, object val ) : IPersistentVector |
Return a new vector with the i-th value set to
|
|
cons ( object o ) : IPersistentVector |
Creates a new vector with a new item at the end.
|
|
count ( ) : int |
Gets the number of items in the collection.
|
|
empty ( ) : IPersistentCollection |
Gets an empty collection of the same type.
|
|
length ( ) : int |
Gets the number of items in the vector. Not sure why you wouldn't use |
|
nth ( int i ) : object |
Get the i-th item in the vector. Throws an exception if the index |
|
pop ( ) : IPersistentStack |
Returns a new stack with the top element popped.
|
|
withMeta ( IPersistentMap meta ) : IObj |
Create a copy with new metadata.
|
Метод | Описание | |
---|---|---|
IPersistentCollection ( object o ) : IPersistentCollection |
Returns a new collection that has the given element cons'd on front of the eixsting collection.
|
public SubVector ( IPersistentMap meta, IPersistentVector v, int start, int end ) : System | ||
meta | IPersistentMap | The metatdata to attach. |
v | IPersistentVector | The vector to subvector. |
start | int | The start index of the subvector. |
end | int | The end index of the subvector. |
Результат | System |
public assocN ( int i, object val ) : IPersistentVector | ||
i | int | The index of the item to set. |
val | object | The new value |
Результат | IPersistentVector |
public cons ( object o ) : IPersistentVector | ||
o | object | The item to add to the vector. |
Результат | IPersistentVector |
public nth ( int i ) : object | ||
i | int | The index of the item to retrieve/ |
Результат | object |
public withMeta ( IPersistentMap meta ) : IObj | ||
meta | IPersistentMap | The new metadata. |
Результат | IObj |