C# Класс LibiadaCore.Core.CongenericChain

The congeneric chain.
Наследование: AbstractChain
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClearAndSetNewLength ( int newLength ) : void

Deletes chain (building and alphabet) and creates new empty chain with given length. Saves old element (alphabet) of chain.

Clone ( ) : IBaseObject

Creates clone of this chain.

CongenericChain ( IBaseObject element ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( IBaseObject element, int length ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( IEnumerable positions, IBaseObject element, int length ) : System

Initializes a new instance of the CongenericChain class.

CongenericChain ( bool map, IBaseObject element ) : System

Initializes a new instance of the CongenericChain class.

DeleteAt ( int index ) : void

Deletes given position. Clears element from position if any. Reduces chain length by 1. The delete at.

Equals ( object other ) : bool

The equals.

Get ( int index ) : IBaseObject

Gets element by position index. If position is empty returns NullValue.

GetFirstAfter ( int index ) : int

Returns position of first occurrence of element after given position.

GetIntervals ( Link link ) : int[]

Returns clone of intervals array including interval of given link.

GetLength ( ) : int

The get length.

GetOccurrence ( int occurrence ) : int

Returns position of given occurrence of element of this chain. If occurrence not found returns -1.

RemoveAt ( int index ) : void

Removes element from given position. Also clears interval manager of chain.

Set ( IBaseObject item, int index ) : void

Sets item in provided position. Clears position if element not from this chain. Does nothing if position is empty and element not from this chain.

Set ( int index ) : void

Sets item in provided position.

SetIntervalManager ( CongenericIntervalsManager manager ) : void

Sets interval manager of chain.

Описание методов

ClearAndSetNewLength() публичный Метод

Deletes chain (building and alphabet) and creates new empty chain with given length. Saves old element (alphabet) of chain.
/// Thrown if new length is less than 0. ///
public ClearAndSetNewLength ( int newLength ) : void
newLength int /// New chain length. ///
Результат void

Clone() публичный Метод

Creates clone of this chain.
public Clone ( ) : IBaseObject
Результат IBaseObject

CongenericChain() публичный Метод

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IBaseObject element ) : System
element IBaseObject /// The element. ///
Результат System

CongenericChain() публичный Метод

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IBaseObject element, int length ) : System
element IBaseObject /// Element of this congeneric sequence. ///
length int /// Length of this chain. ///
Результат System

CongenericChain() публичный Метод

Initializes a new instance of the CongenericChain class.
public CongenericChain ( IEnumerable positions, IBaseObject element, int length ) : System
positions IEnumerable /// The positions of all elements in congeneric sequence. ///
element IBaseObject /// Element of this congeneric sequence. ///
length int /// Length of this chain. ///
Результат System

CongenericChain() публичный Метод

Initializes a new instance of the CongenericChain class.
public CongenericChain ( bool map, IBaseObject element ) : System
map bool /// The map of elements. ///
element IBaseObject /// Element of this congeneric sequence. ///
Результат System

DeleteAt() публичный Метод

Deletes given position. Clears element from position if any. Reduces chain length by 1. The delete at.
public DeleteAt ( int index ) : void
index int /// The index of position. ///
Результат void

Equals() публичный Метод

The equals.
public Equals ( object other ) : bool
other object /// The other. ///
Результат bool

Get() публичный Метод

Gets element by position index. If position is empty returns NullValue.
public Get ( int index ) : IBaseObject
index int /// Index of position. ///
Результат IBaseObject

GetFirstAfter() публичный Метод

Returns position of first occurrence of element after given position.
public GetFirstAfter ( int index ) : int
index int /// Starting position for search. ///
Результат int

GetIntervals() публичный Метод

Returns clone of intervals array including interval of given link.
public GetIntervals ( Link link ) : int[]
link Link /// The link. ///
Результат int[]

GetLength() публичный Метод

The get length.
public GetLength ( ) : int
Результат int

GetOccurrence() публичный Метод

Returns position of given occurrence of element of this chain. If occurrence not found returns -1.
public GetOccurrence ( int occurrence ) : int
occurrence int /// Occurrence to find. ///
Результат int

RemoveAt() публичный Метод

Removes element from given position. Also clears interval manager of chain.
public RemoveAt ( int index ) : void
index int /// Index of position. ///
Результат void

Set() публичный Метод

Sets item in provided position. Clears position if element not from this chain. Does nothing if position is empty and element not from this chain.
public Set ( IBaseObject item, int index ) : void
item IBaseObject /// The item. ///
index int /// The index of position. ///
Результат void

Set() публичный Метод

Sets item in provided position.
public Set ( int index ) : void
index int /// The index. ///
Результат void

SetIntervalManager() публичный Метод

Sets interval manager of chain.
public SetIntervalManager ( CongenericIntervalsManager manager ) : void
manager CongenericIntervalsManager /// The manager. ///
Результат void