C# 클래스 clojure.lang.APersistentVector.SubVector

Internal class providing subvector functionality for APersistentVector.
상속: APersistentVector, IPersistentCollection
파일 보기 프로젝트 열기: arohner/clojure-contrib

공개 메소드들

메소드 설명
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