C# Класс clojure.lang.APersistentVector.SubVector

Internal class providing subvector functionality for APersistentVector.
Наследование: APersistentVector, IPersistentCollection
Показать файл Открыть проект

Открытые методы

Метод Описание
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 val.

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 count() intead.

nth ( int i ) : object

Get the i-th item in the vector.

Throws an exception if the index i is not in the range of the vector's elements.

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.

Описание методов

SubVector() публичный Метод

Initialize a subvector, with the given metadata and start/end indices.
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

assocN() публичный Метод

Return a new vector with the i-th value set to val.
public assocN ( int i, object val ) : IPersistentVector
i int The index of the item to set.
val object The new value
Результат IPersistentVector

cons() публичный Метод

Creates a new vector with a new item at the end.
public cons ( object o ) : IPersistentVector
o object The item to add to the vector.
Результат IPersistentVector

count() публичный Метод

Gets the number of items in the collection.
public count ( ) : int
Результат int

empty() публичный Метод

Gets an empty collection of the same type.
public empty ( ) : IPersistentCollection
Результат IPersistentCollection

length() публичный Метод

Gets the number of items in the vector.
Not sure why you wouldn't use count() intead.
public length ( ) : int
Результат int

nth() публичный Метод

Get the i-th item in the vector.
Throws an exception if the index i is not in the range of the vector's elements.
public nth ( int i ) : object
i int The index of the item to retrieve/
Результат object

pop() публичный Метод

Returns a new stack with the top element popped.
public pop ( ) : IPersistentStack
Результат IPersistentStack

withMeta() публичный Метод

Create a copy with new metadata.
public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap The new metadata.
Результат IObj