C# Class clojure.lang.APersistentVector

Provides a basic implementation of IPersistentVector functionality.
Inheritance: AFn, IPersistentVector, Streamable, IList, IComparable
Datei anzeigen Open project: arohner/clojure-contrib Class Usage Examples

Public Methods

Method Description
APersistentVector ( IPersistentMap meta ) : System

Initializes an APersistentVector with the given metadata.

Add ( object value ) : int
Clear ( ) : void
CompareTo ( object obj ) : int
Contains ( object value ) : bool
CopyTo ( Array array, int index ) : void
Equals ( object obj ) : bool

Determines whether the specified Object is equal to the current Object.

GetEnumerator ( ) : IEnumerator
GetHashCode ( ) : int

Compute a hash code for the current object.

IndexOf ( object value ) : int
Insert ( int index, object value ) : void
Remove ( object value ) : void
RemoveAt ( int index ) : void
ToString ( ) : string

Returns a string representing the object.

assoc ( object key, object val ) : Associative

Add a new key/value pair.

assocN ( int i, object val ) : IPersistentVector
cons ( object o ) : IPersistentVector
containsKey ( object key ) : bool

Test if the map contains a key.

count ( ) : int
doEquals ( IPersistentVector v, object obj ) : bool

Compares an IPersistentVector to another object for equality.

empty ( ) : IPersistentCollection
entryAt ( object key ) : IMapEntry

Returns the key/value pair for this key.

equiv ( object obj ) : bool

Determine if an object is equivalent to this (handles all collections).

invoke ( object arg1 ) : object
length ( ) : int
nth ( int i ) : object
peek ( ) : object

Peek at the top (first) element in the stack.

pop ( ) : IPersistentStack
rseq ( ) : ISeq

Gets an ISeq to travers the sequence in reverse.

seq ( ) : ISeq

Gets an ISeq to allow first/rest iteration through the collection.

stream ( ) : IStream
this ( int index ) : object
valAt ( object key ) : object

Gets the value associated with a key.

valAt ( object key, object notFound ) : object

Gets the value associated with a key.

Private Methods

Method Description
IPersistentCollection ( object o ) : IPersistentCollection

Returns a new collection that has the given element cons'd on front of the eixsting collection.

doEquiv ( IPersistentVector v, object obj ) : bool

Method Details

APersistentVector() public method

Initializes an APersistentVector with the given metadata.
public APersistentVector ( IPersistentMap meta ) : System
meta IPersistentMap The metadata to attach
return System

Add() public method

public Add ( object value ) : int
value object
return int

Clear() public method

public Clear ( ) : void
return void

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

Contains() public method

public Contains ( object value ) : bool
value object
return bool

CopyTo() public method

public CopyTo ( Array array, int index ) : void
array System.Array
index int
return void

Equals() public method

Determines whether the specified Object is equal to the current Object.
public Equals ( object obj ) : bool
obj object The Object to compare with the current Object.
return bool

GetEnumerator() public method

public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetHashCode() public method

Compute a hash code for the current object.
public GetHashCode ( ) : int
return int

IndexOf() public method

public IndexOf ( object value ) : int
value object
return int

Insert() public method

public Insert ( int index, object value ) : void
index int
value object
return void

Remove() public method

public Remove ( object value ) : void
value object
return void

RemoveAt() public method

public RemoveAt ( int index ) : void
index int
return void

ToString() public method

Returns a string representing the object.
public ToString ( ) : string
return string

assoc() public method

Add a new key/value pair.
public assoc ( object key, object val ) : Associative
key object The key
val object The value
return Associative

assocN() public abstract method

public abstract assocN ( int i, object val ) : IPersistentVector
i int
val object
return IPersistentVector

cons() public abstract method

public abstract cons ( object o ) : IPersistentVector
o object
return IPersistentVector

containsKey() public method

Test if the map contains a key.
public containsKey ( object key ) : bool
key object The key to test for membership
return bool

count() public abstract method

public abstract count ( ) : int
return int

doEquals() public static method

Compares an IPersistentVector to another object for equality.
public static doEquals ( IPersistentVector v, object obj ) : bool
v IPersistentVector The IPersistentVector to compare.
obj object The other object to compare.
return bool

empty() public abstract method

public abstract empty ( ) : IPersistentCollection
return IPersistentCollection

entryAt() public method

Returns the key/value pair for this key.
public entryAt ( object key ) : IMapEntry
key object The key to retrieve
return IMapEntry

equiv() public method

Determine if an object is equivalent to this (handles all collections).
public equiv ( object obj ) : bool
obj object
return bool

invoke() public method

public invoke ( object arg1 ) : object
arg1 object
return object

length() public abstract method

public abstract length ( ) : int
return int

nth() public abstract method

public abstract nth ( int i ) : object
i int
return object

peek() public method

Peek at the top (first) element in the stack.
public peek ( ) : object
return object

pop() public abstract method

public abstract pop ( ) : IPersistentStack
return IPersistentStack

rseq() public method

Gets an ISeq to travers the sequence in reverse.
public rseq ( ) : ISeq
return ISeq

seq() public method

Gets an ISeq to allow first/rest iteration through the collection.
public seq ( ) : ISeq
return ISeq

stream() public method

public stream ( ) : IStream
return IStream

this() public method

public this ( int index ) : object
index int
return object

valAt() public method

Gets the value associated with a key.
public valAt ( object key ) : object
key object The key to look up.
return object

valAt() public method

Gets the value associated with a key.
public valAt ( object key, object notFound ) : object
key object The key to look up.
notFound object The value to return if the key is not present.
return object