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

Basic sequence class. Stores alphabet and building.
Наследование: AbstractChain
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Id long

Защищенные свойства (Protected)

Свойство Тип Описание
alphabet Alphabet
building int[]

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

Метод Описание
BaseChain ( ) : System

Initializes a new instance of the BaseChain class with 0 length.

BaseChain ( List elements ) : System

Initializes a new instance of the BaseChain class from list of elements.

BaseChain ( int length ) : System

Initializes a new instance of the BaseChain class.

BaseChain ( int building, Alphabet alphabet ) : System

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.

BaseChain ( int building, Alphabet alphabet, long id ) : System

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.

BaseChain ( string source ) : System

Initializes a new instance of the BaseChain class from string. Each character becomes element.

ClearAndSetNewLength ( int length ) : void

Deletes chain (building and alphabet) and creates new empty chain with given length.

Clone ( ) : IBaseObject

Creates clone of this chain.

DeleteAt ( int index ) : void

Removes given position.

Equals ( object other ) : bool

The equals.

Get ( int index ) : IBaseObject

Returns element by index.

GetLength ( ) : int

The length of chain.

RemoveAt ( int index ) : void

Removes element from given position.

Set ( IBaseObject item, int index ) : void

Sets or replaces element in specified position.

Защищенные методы

Метод Описание
FillClone ( BaseChain clone ) : void

Fills the clone of chain with clones of alphabet and building.

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

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

Initializes a new instance of the BaseChain class with 0 length.
public BaseChain ( ) : System
Результат System

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

Initializes a new instance of the BaseChain class from list of elements.
public BaseChain ( List elements ) : System
elements List /// The elements. ///
Результат System

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

Initializes a new instance of the BaseChain class.
public BaseChain ( int length ) : System
length int /// The length of chain. ///
Результат System

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

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.
public BaseChain ( int building, Alphabet alphabet ) : System
building int /// The building of chain. ///
alphabet Alphabet /// The alphabet of chain. ///
Результат System

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

Initializes a new instance of the BaseChain class with provided building and alphabet. Only simple validation is made.
public BaseChain ( int building, Alphabet alphabet, long id ) : System
building int /// The building of chain. ///
alphabet Alphabet /// The alphabet of chain. ///
id long /// Id of sequence ///
Результат System

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

Initializes a new instance of the BaseChain class from string. Each character becomes element.
public BaseChain ( string source ) : System
source string /// The source string. ///
Результат System

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

Deletes chain (building and alphabet) and creates new empty chain with given length.
/// Thrown if length of new sequence is less then zero. ///
public ClearAndSetNewLength ( int length ) : void
length int /// New chain length. ///
Результат void

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

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

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

Removes given position.
public DeleteAt ( int index ) : void
index int /// Index of deleted position. ///
Результат void

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

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

FillClone() защищенный Метод

Fills the clone of chain with clones of alphabet and building.
protected FillClone ( BaseChain clone ) : void
clone BaseChain /// The clone. ///
Результат void

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

Returns element by index.
public Get ( int index ) : IBaseObject
index int /// Index of element. ///
Результат IBaseObject

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

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

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

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

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

Sets or replaces element in specified position.
public Set ( IBaseObject item, int index ) : void
item IBaseObject /// Element to set. ///
index int /// Position in sequence. ///
Результат void

Описание свойств

Id публичное свойство

Sequence id (from database).
public long Id
Результат long

alphabet защищенное свойство

The alphabet of chain.
protected Alphabet alphabet
Результат Alphabet

building защищенное свойство

The building of chain.
protected int[] building
Результат int[]