C# 클래스 com.calitha.commons.IntegerList

A type-safe list of integers.
파일 보기 프로젝트 열기: luca-cardelli/KaemikaXM 1 사용 예제들

공개 메소드들

메소드 설명
Add ( int value ) : int

Adds an integer to a list.

Clear ( ) : void

Removes all elements from the list.

Clone ( ) : object

A shallow copy of the list.

Contains ( int value ) : bool
CopyTo ( Array array ) : void

Copies the entire list to a compatible one-dimensional array, starting at the beginning of the target array.

CopyTo ( Array array, int arrayIndex ) : void

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

CopyTo ( int index, Array array, int arrayIndex, int count ) : void

Copies a range of elements from the list to a compatible one-dimensional Array, starting at the specified index of the target array.

Equals ( object obj ) : bool

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

Equals ( object objA, object objB ) : bool

Determines whether the specified Object instances are considered equal.

GetEnumerator ( ) : IEnumerator

Returns an enumerator for the entire list.

GetEnumerator ( int index, int count ) : IEnumerator

Returns an enumerator for a section of the ArrayList.

GetHashCode ( ) : int

Serves as a hash function.

GetRange ( int index, int count ) : IntegerList

Returns an integer list which represents a subset of the elements in the source list.

IndexOf ( int value ) : int

Searches for the specified Object and returns the zero-based index of the first occurrence within the entire list.

IndexOf ( int value, int startIndex ) : int

Searches for the specified Object and returns the zero-based index of the first occurrence within the section of the ArrayList that extends from the specified index to the last element.

IndexOf ( int value, int startIndex, int count ) : int

Searches for the specified Object and returns the zero-based index of the first occurrence within the section of the list that starts at the specified index and contains the specified number of elements.

Insert ( int index, int value ) : void

Inserts an element into the list at the specified index.

InsertRange ( int index, IntegerList other ) : void

Inserts the elements of the other integer list into the list at the specified index.

IntegerList ( ) : System

Creates a new integer list.

LastIndexOf ( int value ) : int

Searches for the specified value and returns the zero-based index of the last occurrence within the entire list.

LastIndexOf ( int value, int startIndex ) : int

Searches for the specified value and returns the zero-based index of the last occurrence within the section of the list that extends from the first element to the specified index

LastIndexOf ( int value, int startIndex, int count ) : int

Searches for the specified value and returns the zero-based index of the last occurrence within the section of the list that contains the specified number of elements and ends at the specified index.

Remove ( int value ) : void

Removes the first occurrence of a specific value from the list.

RemoveAt ( int index ) : void

Removes the element at the specified index of the list.

RemoveRange ( int index, int count ) : void

Removes a range of elements from the list.

Repeat ( int value, int count ) : IntegerList

Returns an IntegerList whose elements are copies of the specified value.

Reverse ( ) : void

Reverses the order of the elements in the entire list.

Reverse ( int index, int count ) : void

Reverses the order of the elements in the specified range.

SetRange ( int index, IntegerList otherList ) : void

Copies the elements of a collection over a range of elements in the list.

Sort ( ) : void

Sorts the elements in the entire list using the IComparable implementation of the Integer.

Sort ( IComparer comparer ) : void

Sorts the elements in the entire ArrayList using the specified comparer.

Sort ( int index, int count, IComparer comparer ) : void

Sorts the elements in a section of the list using the specified comparer.

Synchronized ( IntegerList list ) : IntegerList

Returns an IntegerList wrapper that is synchronized.

ToString ( ) : string

Returns a String that represents the list.

TrimToSize ( ) : void

Sets the capacity to the actual number of elements in the list.

this ( int index ) : int

Gets a value from the list.

메소드 상세

Add() 공개 메소드

Adds an integer to a list.
public Add ( int value ) : int
value int The value that will be added.
리턴 int

Clear() 공개 메소드

Removes all elements from the list.
public Clear ( ) : void
리턴 void

Clone() 공개 메소드

A shallow copy of the list.
public Clone ( ) : object
리턴 object

Contains() 공개 메소드

public Contains ( int value ) : bool
value int
리턴 bool

CopyTo() 공개 메소드

Copies the entire list to a compatible one-dimensional array, starting at the beginning of the target array.
public CopyTo ( Array array ) : void
array Array The one-dimensional Array that is the destination /// of the elements copied from the list. /// The Array must have zero-based indexing.
리턴 void

CopyTo() 공개 메소드

Copies the entire list to a compatible one-dimensional Array, starting at the specified index of the target array.
public CopyTo ( Array array, int arrayIndex ) : void
array Array The one-dimensional Array that is the destination /// of the elements copied from ArrayList. /// The Array must have zero-based indexing.
arrayIndex int The zero-based index in array at which /// copying begins.
리턴 void

CopyTo() 공개 메소드

Copies a range of elements from the list to a compatible one-dimensional Array, starting at the specified index of the target array.
public CopyTo ( int index, Array array, int arrayIndex, int count ) : void
index int The zero-based index in the source list at which copying begins.
array Array The one-dimensional Array that is the destination of /// the elements copied from the list. The Array must have zero-based indexing.
arrayIndex int The zero-based index in array at which copying begins.
count int The number of elements to copy.
리턴 void

Equals() 공개 메소드

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

Equals() 공개 정적인 메소드

Determines whether the specified Object instances are considered equal.
public static Equals ( object objA, object objB ) : bool
objA object The first Object to compare.
objB object The second Object to compare.
리턴 bool

GetEnumerator() 공개 메소드

Returns an enumerator for the entire list.
public GetEnumerator ( ) : IEnumerator
리턴 IEnumerator

GetEnumerator() 공개 메소드

Returns an enumerator for a section of the ArrayList.
public GetEnumerator ( int index, int count ) : IEnumerator
index int The zero-based starting index of the ArrayList section /// that the enumerator should refer to.
count int The number of elements in the ArrayList section that /// the enumerator should refer to
리턴 IEnumerator

GetHashCode() 공개 메소드

Serves as a hash function.
public GetHashCode ( ) : int
리턴 int

GetRange() 공개 메소드

Returns an integer list which represents a subset of the elements in the source list.
public GetRange ( int index, int count ) : IntegerList
index int The zero-based list index at which the range starts.
count int The number of elements in the range.
리턴 IntegerList

IndexOf() 공개 메소드

Searches for the specified Object and returns the zero-based index of the first occurrence within the entire list.
public IndexOf ( int value ) : int
value int The value to locate in the list.
리턴 int

IndexOf() 공개 메소드

Searches for the specified Object and returns the zero-based index of the first occurrence within the section of the ArrayList that extends from the specified index to the last element.
public IndexOf ( int value, int startIndex ) : int
value int The value to locate in the list.
startIndex int The zero-based starting index of the search.
리턴 int

IndexOf() 공개 메소드

Searches for the specified Object and returns the zero-based index of the first occurrence within the section of the list that starts at the specified index and contains the specified number of elements.
public IndexOf ( int value, int startIndex, int count ) : int
value int The value to locate in the list.
startIndex int The zero-based starting index of the search.
count int The number of elements in the section to search.
리턴 int

Insert() 공개 메소드

Inserts an element into the list at the specified index.
public Insert ( int index, int value ) : void
index int The zero-based index at which value should be inserted.
value int The value to insert.
리턴 void

InsertRange() 공개 메소드

Inserts the elements of the other integer list into the list at the specified index.
public InsertRange ( int index, IntegerList other ) : void
index int The zero-based index at which the new elements should be inserted.
other IntegerList The other list whose elements should be inserted into the list.
리턴 void

IntegerList() 공개 메소드

Creates a new integer list.
public IntegerList ( ) : System
리턴 System

LastIndexOf() 공개 메소드

Searches for the specified value and returns the zero-based index of the last occurrence within the entire list.
public LastIndexOf ( int value ) : int
value int The value to locate in the list.
리턴 int

LastIndexOf() 공개 메소드

Searches for the specified value and returns the zero-based index of the last occurrence within the section of the list that extends from the first element to the specified index
public LastIndexOf ( int value, int startIndex ) : int
value int The value to search for.
startIndex int The zero-based starting index of the backward search.
리턴 int

LastIndexOf() 공개 메소드

Searches for the specified value and returns the zero-based index of the last occurrence within the section of the list that contains the specified number of elements and ends at the specified index.
public LastIndexOf ( int value, int startIndex, int count ) : int
value int The value to locate in the list.
startIndex int The zero-based starting index of the backward search.
count int The number of elements in the section to search.
리턴 int

Remove() 공개 메소드

Removes the first occurrence of a specific value from the list.
public Remove ( int value ) : void
value int The value to remove from the list.
리턴 void

RemoveAt() 공개 메소드

Removes the element at the specified index of the list.
public RemoveAt ( int index ) : void
index int The zero-based index of the element to remove.
리턴 void

RemoveRange() 공개 메소드

Removes a range of elements from the list.
public RemoveRange ( int index, int count ) : void
index int The zero-based starting index of the range of elements to remove.
count int The number of elements to remove.
리턴 void

Repeat() 공개 정적인 메소드

Returns an IntegerList whose elements are copies of the specified value.
public static Repeat ( int value, int count ) : IntegerList
value int The value to copy multiple times in the list.
count int The number of times value should be copied.
리턴 IntegerList

Reverse() 공개 메소드

Reverses the order of the elements in the entire list.
public Reverse ( ) : void
리턴 void

Reverse() 공개 메소드

Reverses the order of the elements in the specified range.
public Reverse ( int index, int count ) : void
index int The zero-based starting index of the range to reverse.
count int The number of elements in the range to reverse.
리턴 void

SetRange() 공개 메소드

Copies the elements of a collection over a range of elements in the list.
public SetRange ( int index, IntegerList otherList ) : void
index int The zero-based index at which to start copying the elements /// of otherList
otherList IntegerList The other list whose elements to copy to the list.
리턴 void

Sort() 공개 메소드

Sorts the elements in the entire list using the IComparable implementation of the Integer.
public Sort ( ) : void
리턴 void

Sort() 공개 메소드

Sorts the elements in the entire ArrayList using the specified comparer.
public Sort ( IComparer comparer ) : void
comparer IComparer The IComparer implementation to use when comparing elements.
리턴 void

Sort() 공개 메소드

Sorts the elements in a section of the list using the specified comparer.
public Sort ( int index, int count, IComparer comparer ) : void
index int The zero-based starting index of the range to sort.
count int The length of the range to sort.
comparer IComparer The IComparer implementation to use when comparing elements.
리턴 void

Synchronized() 공개 정적인 메소드

Returns an IntegerList wrapper that is synchronized.
public static Synchronized ( IntegerList list ) : IntegerList
list IntegerList The list to synchronize.
리턴 IntegerList

ToString() 공개 메소드

Returns a String that represents the list.
public ToString ( ) : string
리턴 string

TrimToSize() 공개 메소드

Sets the capacity to the actual number of elements in the list.
public TrimToSize ( ) : void
리턴 void

this() 공개 메소드

Gets a value from the list.
public this ( int index ) : int
index int
리턴 int