Class Rings

The class Rings describes a collection of Ring chromosomes of unknown origin.

Overview

Rings
New() 
CountMax: Integer {read-only}
CountMin:  Integer {read-only}
item(index: Integer): Ring {default; read-only}
add(ByRef AdditionalRing: Ring)
clone(): Object {Implements ICloneable.Clone} 
count(): Integer 
findRing(ByRef RingToFind: Ring): Integer
GetEnumerator(): IEnumerator {Implements IEnumerable.GetEnumerator} 
removeAt(index: Integer): void
toString(): String 
toString(format: String): String 

Programming Language

  • Microsoft Visual Basic .Net.

Availability

Constructors

Public Sub New()

Instantiates a new Rings object. Its internal collection of ring chromosomes is empty.

Interfaces

ICloneable

is implemented with the clone function.

IEnumerable

is implemented with the GetEnumerator function.

Enumerations

The class does not provides enumerations.

Properties

All properties are are read-only.

CountMax As Integer

Gets a value indicating the sum of maximum copy numbers of the Ring chromosomes in this collection.

Property Value

  • a value indicating the sum of maximum copy numbers of the Ring chromosomes in this collection.

Remarks

  • CountMax and CountMin are increased whenever a Ring object is added to the collection.

CountMin As Integer

Gets a value indicating the sum of minimum copy numbers of the Ring chromosomes in this collection.

Property Value

  • a value indicating the sum of minimum copy numbers of the Ring chromosomes in this collection.

Remarks

  • CountMax and CountMin are increased whenever a Ring object is added to the collection.

Default Public ReadOnly Property item(ByVal Index As Integer) As Ring

Returns the Ring object at the specified index.

Property Value

Parameters

  • index: The zero-based index of the element to get.

Exceptions

Remarks

  • This property provides the ability to access a specific Ring object in the Rings object by using the following syntax: myRings(index).
  • The property is read-only.

Methods

Public Sub add(ByRef AdditionalRing As Ring)

Adds AdditionalRing to the collection. AdditionalRing must not be a null reference.

Parameters

  • AdditionalRing: areference to the Ring to be added to the collection.

Exceptions

Remarks

  • The values for minimum copies and maximum copies of Rings in the collection is increased.
  • A reference to the AdditionalRing is added to the collection, not a clone of it.

Public Function clone() As Object Implements ICloneable.Clone

Creates a deep copy of the Rings object; i.e. while cloning, each Ring object contained in the collection is cloned.

Return Value

  • A deep copy of the Rings object.

Implements

Remarks

  • A deep copy copies not only the elements of the internal collection, but it does also copy the objects that the references refer to. I.e. each Ring object contained in the internal collection is cloned by a call to Ring.clone().

Public Function count() As Integer

Gets the number of Ring objects actually contained in the Rings object.

Public Function findRing(ByRef RingToFind As Ring) As Integer

Returns the index for a specified Ring object to be located in the internal collection.

Return Value

  • the index for a specified Ring object to be located in the internal collection.
  • -1, if the specified object is not contained in the collection

Parameters

  • RingToFind: a reference to the ring object to be located.

Remarks

  • This function is similar to the indexOf() functions of collection classes; but it uses a reference instead of a value type as a parameter.

Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator

Returns an enumerator that can iterate through the collection of Ring objects of this Rings object. The list is sorted.

Implements

Remarks

  • The underlying collection is sorted first.

Public Sub removeAt(ByVal Index As Integer)

Removes the element at the specified index of the internal collection.

Return Value

  • None.

Parameters

  • index: The zero-based index of the element to remove.

Exceptions

Remarks

  • The elements that follow the removed element move up to occupy the vacated spot. The indexes of the elements that are moved are also updated.
  • Internally, the function calls ArrayList.removeAt().

Public Shadows Function toString() As String

Returns a textual description of the Ring chromosomes fulfilling the specification of ISCN 1995.

Return Value

  • a textual description of the Ring chromosomes.

Remarks

Public Overloads Overrides Function toString(format As String) As String

Returns a textual description of the Ring chromosomes fulfilling the specification of ISCN 1995. When the short format is specified, no distinction between non-identified Ring chromosomes is made.

Return Value

  • a textual description of the Ring chromosomes.

Parameters

  • format: "S" means short format. Here, no distinction between individually distinguishable Ring chromosomes is made and a representation showing the added values of Ring numbers is given.

  • "L" means long format (default). Here, Rings are sorted according to their numbers and are written in a comma separated list. Ring.toString() is called for each Ring object.

Remarks

  • If an unknown format is specified, the long format will be taken by default.

Interaction with other classes

Classes using Rings

The Rings class is used by the Karyotype class. Each Karyotype object constitutionally contains exactly one Ring object.

Classes used by Rings

The Rings class is a collection class for the Ring class. One Rings object may contain zero, one or many Ring objects.