C# Class clojure.lang.PersistentVector

Inheritance: APersistentVector, IObj, IEditableCollection, IEnumerable, IReduce
Datei anzeigen Open project: richhickey/clojure-clr Class Usage Examples

Public Methods

Method Description
PersistentVector ( int cnt, int shift, Node root, object tail ) : System

Initialize a PersistentVector from basic components.

asTransient ( ) : ITransientCollection
assocN ( int i, Object val ) : IPersistentVector

Return a new vector with the i-th value set to val.

length ( ) : int

Gets the number of items in the vector.

Not sure why you wouldn't use count() intead.

meta ( ) : IPersistentMap
nth ( int i, Object notFound ) : Object
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.

seq ( ) : ISeq
withMeta ( IPersistentMap meta ) : IObj

Private Methods

Method Description
ArrayFor ( int i ) : object[]
PersistentVector ( IPersistentMap meta, int cnt, int shift, Node root, object tail ) : System

Initialize a PersistentVector from given metadata and basic components.

chunkedSeq ( ) : IChunkedSeq
cons ( object o ) : IPersistentVector
count ( ) : int
create ( ) : PersistentVector
create ( ISeq items ) : PersistentVector
create1 ( ICollection items ) : PersistentVector
doAssoc ( int level, Node node, int i, object val ) : Node
empty ( ) : IPersistentCollection
newPath ( AtomicReference edit, int level, Node node ) : Node
popTail ( int level, Node node ) : Node
pushTail ( int level, Node parent, Node tailnode ) : Node
tailoff ( ) : int

Method Details

PersistentVector() public method

Initialize a PersistentVector from basic components.
public PersistentVector ( int cnt, int shift, Node root, object tail ) : System
cnt int
shift int
root Node
tail object
return System

asTransient() public method

public asTransient ( ) : ITransientCollection
return ITransientCollection

assocN() public method

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
return IPersistentVector

length() public method

Gets the number of items in the vector.
Not sure why you wouldn't use count() intead.
public length ( ) : int
return int

meta() public method

public meta ( ) : IPersistentMap
return IPersistentMap

nth() public method

public nth ( int i, Object notFound ) : Object
i int
notFound Object
return Object

nth() public method

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/
return object

pop() public method

Returns a new stack with the top element popped.
public pop ( ) : IPersistentStack
return IPersistentStack

seq() public method

public seq ( ) : ISeq
return ISeq

withMeta() public method

public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap
return IObj