C# 클래스 Theraot.Collections.ThreadSafe.NeedleBucket

상속: IBucket
파일 보기 프로젝트 열기: pocketgems/Theraot

공개 메소드들

메소드 설명
CopyTo ( Array array, int arrayIndex ) : void

Copies the items to a compatible one-dimensional array, starting at the specified index of the target array.

Exchange ( int index, item, &previous ) : bool

Sets the item at the specified index.

ExchangeNeedle ( int index, needle, &previous ) : bool

Sets the needle at the specified index.

Get ( int index ) : T

Retrieve or creates a new item at the specified index.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

GetNeedle ( int index ) : TNeedle

Retrieve or creates a new needle at the specified index.

Insert ( int index, item ) : bool

Inserts the item at the specified index.

The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the item was overwritten or removed.

Insert ( int index, item, &previous ) : bool

Inserts the item at the specified index.

The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the item was overwritten or removed.

InsertNeedle ( int index, needle ) : bool

Inserts the needle at the specified index.

The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the needle was overwritten or removed.

InsertNeedle ( int index, needle, &previous ) : bool

Inserts the needle at the specified index.

The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the needle was overwritten or removed.

NeedleBucket ( Converter valueFactory, int capacity ) : System

Initializes a new instance of the NeedleBucket{T, TNeedle} class.

NeedleBucket ( Converter valueFactory, int capacity, IEqualityComparer comparer ) : System

Initializes a new instance of the NeedleBucket{T, TNeedle} class.

NeedleBucket ( Func valueFactory, int capacity ) : System

Initializes a new instance of the NeedleBucket{T, TNeedle} class.

NeedleBucket ( Func valueFactory, int capacity, IEqualityComparer comparer ) : System

Initializes a new instance of the NeedleBucket{T, TNeedle} class.

RemoveAt ( int index ) : bool

Removes the item at the specified index.

RemoveAt ( int index, &previous ) : bool

Removes the item at the specified index.

RemoveAt ( int index, Predicate check ) : bool
RemoveNeedleAt ( int index, &previous ) : bool

Removes the needle at the specified index.

Set ( int index, item, bool &isNew ) : void

Sets the item at the specified index.

SetNeedle ( int index, needle, bool &isNew ) : void

Sets the needle at the specified index.

TryGet ( int index, &value ) : bool

Tries to retrieve the item at the specified index.

TryGetNeedle ( int index, &value ) : bool

Tries to retrieve the needle at the specified index.

Update ( int index, Func itemUpdateFactory, Predicate check, bool &isEmpty ) : bool
Where ( Predicate check ) : IEnumerable

비공개 메소드들

메소드 설명
System ( ) : System.Collections.IEnumerator

메소드 상세

CopyTo() 공개 메소드

Copies the items to a compatible one-dimensional array, starting at the specified index of the target array.
array arrayIndex;Non-negative number is required. array;The array can not contain the number of elements.
public CopyTo ( Array array, int arrayIndex ) : void
array Array The array.
arrayIndex int Index of the array.
리턴 void

Exchange() 공개 메소드

Sets the item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public Exchange ( int index, item, &previous ) : bool
index int The index.
item The item.
previous The previous item in the specified index.
리턴 bool

ExchangeNeedle() 공개 메소드

Sets the needle at the specified index.
index;index must be greater or equal to 0 and less than capacity
public ExchangeNeedle ( int index, needle, &previous ) : bool
index int The index.
needle The needle.
previous The previous item in the specified index.
리턴 bool

Get() 공개 메소드

Retrieve or creates a new item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public Get ( int index ) : T
index int The index.
리턴 T

GetEnumerator() 공개 메소드

Returns an enumerator that iterates through a collection.
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

GetNeedle() 공개 메소드

Retrieve or creates a new needle at the specified index.
index;index must be greater or equal to 0 and less than capacity
public GetNeedle ( int index ) : TNeedle
index int The index.
리턴 TNeedle

Insert() 공개 메소드

Inserts the item at the specified index.
The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the item was overwritten or removed.
index;index must be greater or equal to 0 and less than capacity.
public Insert ( int index, item ) : bool
index int The index.
item The item.
리턴 bool

Insert() 공개 메소드

Inserts the item at the specified index.
The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the item was overwritten or removed.
index;index must be greater or equal to 0 and less than capacity
public Insert ( int index, item, &previous ) : bool
index int The index.
item The item.
previous The previous item in the specified index.
리턴 bool

InsertNeedle() 공개 메소드

Inserts the needle at the specified index.
The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the needle was overwritten or removed.
index;index must be greater or equal to 0 and less than capacity.
public InsertNeedle ( int index, needle ) : bool
index int The index.
needle The needle.
리턴 bool

InsertNeedle() 공개 메소드

Inserts the needle at the specified index.
The insertion can fail if the index is already used or is being written by another thread. If the index is being written it can be understood that the insert operation happened before but the needle was overwritten or removed.
index;index must be greater or equal to 0 and less than capacity
public InsertNeedle ( int index, needle, &previous ) : bool
index int The index.
needle The needle.
previous The previous needle in the specified index.
리턴 bool

NeedleBucket() 공개 메소드

Initializes a new instance of the NeedleBucket{T, TNeedle} class.
public NeedleBucket ( Converter valueFactory, int capacity ) : System
valueFactory Converter The delegate that is invoked to do the lazy initialization of the items given their index.
capacity int The capacity.
리턴 System

NeedleBucket() 공개 메소드

Initializes a new instance of the NeedleBucket{T, TNeedle} class.
public NeedleBucket ( Converter valueFactory, int capacity, IEqualityComparer comparer ) : System
valueFactory Converter The delegate that is invoked to do the lazy initialization of the items given their index.
capacity int The capacity.
comparer IEqualityComparer The equality comparer
리턴 System

NeedleBucket() 공개 메소드

Initializes a new instance of the NeedleBucket{T, TNeedle} class.
public NeedleBucket ( Func valueFactory, int capacity ) : System
valueFactory Func The delegate that is invoked to do the lazy initialization of the items.
capacity int The capacity.
리턴 System

NeedleBucket() 공개 메소드

Initializes a new instance of the NeedleBucket{T, TNeedle} class.
public NeedleBucket ( Func valueFactory, int capacity, IEqualityComparer comparer ) : System
valueFactory Func The delegate that is invoked to do the lazy initialization of the items.
capacity int The capacity.
comparer IEqualityComparer The equality comparer
리턴 System

RemoveAt() 공개 메소드

Removes the item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public RemoveAt ( int index ) : bool
index int The index.
리턴 bool

RemoveAt() 공개 메소드

Removes the item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public RemoveAt ( int index, &previous ) : bool
index int The index.
previous The previous item in the specified index.
리턴 bool

RemoveAt() 공개 메소드

public RemoveAt ( int index, Predicate check ) : bool
index int
check Predicate
리턴 bool

RemoveNeedleAt() 공개 메소드

Removes the needle at the specified index.
index;index must be greater or equal to 0 and less than capacity
public RemoveNeedleAt ( int index, &previous ) : bool
index int The index.
previous The previous needle in the specified index.
리턴 bool

Set() 공개 메소드

Sets the item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public Set ( int index, item, bool &isNew ) : void
index int The index.
item The item.
isNew bool if set to true the index was not previously used.
리턴 void

SetNeedle() 공개 메소드

Sets the needle at the specified index.
index;index must be greater or equal to 0 and less than capacity
public SetNeedle ( int index, needle, bool &isNew ) : void
index int The index.
needle The needle.
isNew bool if set to true the index was not previously used.
리턴 void

TryGet() 공개 메소드

Tries to retrieve the item at the specified index.
index;index must be greater or equal to 0 and less than capacity
public TryGet ( int index, &value ) : bool
index int The index.
value The value.
리턴 bool

TryGetNeedle() 공개 메소드

Tries to retrieve the needle at the specified index.
index;index must be greater or equal to 0 and less than capacity
public TryGetNeedle ( int index, &value ) : bool
index int The index.
value The value.
리턴 bool

Update() 공개 메소드

public Update ( int index, Func itemUpdateFactory, Predicate check, bool &isEmpty ) : bool
index int
itemUpdateFactory Func
check Predicate
isEmpty bool
리턴 bool

Where() 공개 메소드

public Where ( Predicate check ) : IEnumerable
check Predicate
리턴 IEnumerable