C# 클래스 clojure.lang.PersistentArrayMap

상속: APersistentMap, IObj, IEditableCollection
파일 보기 프로젝트 열기: richhickey/clojure-clr

보호된 프로퍼티들

프로퍼티 타입 설명
_array object[]

공개 메소드들

메소드 설명
PersistentArrayMap ( object init ) : System

Initializes a PersistentArrayMap to use the supplied key/value array.

The array is used directly. Do not modify externally or immutability is sacrificed.

asTransient ( ) : ITransientCollection
assoc ( object key, object val ) : IPersistentMap

Add a new key/value pair.

Overwrites an exising value for the key, if present.

assocEx ( object key, object val ) : IPersistentMap

Add a new key/value pair.

Throws an exception if key has a value already.

containsKey ( object key ) : bool

Test if the map contains a key.

count ( ) : int

Gets the number of items in the collection.

empty ( ) : IPersistentCollection

Gets an empty collection of the same type.

entryAt ( object key ) : IMapEntry

Returns the key/value pair for this key.

meta ( ) : IPersistentMap
seq ( ) : ISeq

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

valAt ( object key ) : object

Gets the value associated with a key.

valAt ( object key, object notFound ) : object

Gets the value associated with a key.

withMeta ( IPersistentMap meta ) : IObj

Create a copy with new metadata.

without ( object key ) : IPersistentMap

Remove a key entry.

보호된 메소드들

메소드 설명
PersistentArrayMap ( ) : System

Create an empty PersistentArrayMap.

PersistentArrayMap ( IPersistentMap meta, object init ) : System

Initializes a PersistentArrayMap to use the supplied key/value array and metadata.

The array is used directly. Do not modify externally or immutability is sacrificed.

비공개 메소드들

메소드 설명
EqualKey ( object k1, object k2 ) : bool

Compare two keys for equality.

Handles nulls properly.

IndexOfKey ( object key ) : int

Gets the index of the key in the array.

create ( IDictionary other ) : IPersistentMap
create ( ) : PersistentArrayMap
createHT ( object init ) : IPersistentMap

Create an IPersistentMap to hold the data when an operation causes the threshhold size to be exceeded.

createWithCheck ( Object init ) : PersistentArrayMap

메소드 상세

PersistentArrayMap() 보호된 메소드

Create an empty PersistentArrayMap.
protected PersistentArrayMap ( ) : System
리턴 System

PersistentArrayMap() 보호된 메소드

Initializes a PersistentArrayMap to use the supplied key/value array and metadata.
The array is used directly. Do not modify externally or immutability is sacrificed.
protected PersistentArrayMap ( IPersistentMap meta, object init ) : System
meta IPersistentMap The metadata to attach.
init object An array with alternating keys and values.
리턴 System

PersistentArrayMap() 공개 메소드

Initializes a PersistentArrayMap to use the supplied key/value array.
The array is used directly. Do not modify externally or immutability is sacrificed.
public PersistentArrayMap ( object init ) : System
init object An array with alternating keys and values.
리턴 System

asTransient() 공개 메소드

public asTransient ( ) : ITransientCollection
리턴 ITransientCollection

assoc() 공개 메소드

Add a new key/value pair.
Overwrites an exising value for the key, if present.
public assoc ( object key, object val ) : IPersistentMap
key object The key
val object The value
리턴 IPersistentMap

assocEx() 공개 메소드

Add a new key/value pair.
Throws an exception if key has a value already.
public assocEx ( object key, object val ) : IPersistentMap
key object The key
val object The value
리턴 IPersistentMap

containsKey() 공개 메소드

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

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

entryAt() 공개 메소드

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

meta() 공개 메소드

public meta ( ) : IPersistentMap
리턴 IPersistentMap

seq() 공개 메소드

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

valAt() 공개 메소드

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

valAt() 공개 메소드

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.
리턴 object

withMeta() 공개 메소드

Create a copy with new metadata.
public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap The new metadata.
리턴 IObj

without() 공개 메소드

Remove a key entry.
public without ( object key ) : IPersistentMap
key object The key to remove
리턴 IPersistentMap

프로퍼티 상세

_array 보호되어 있는 프로퍼티

The array holding the key/value pairs.
The i-th pair is in _array[2*i] and _array[2*i+1].
protected object[] _array
리턴 object[]