Click or drag to resize
UOPairT Structure
Defines a pair in which the order of the two items are always keep sorted. This struct is hashable and IComparable based on its elements.

Namespace: Bio.Util
Assembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax
public struct UOPair<T> : IEnumerable<T>, IEnumerable, 
	IComparable<UOPair<T>>
where T : Object, IComparable<T>

Type Parameters

T
The type of the pair's elements

The UOPairT type exposes the following members.

Constructors
  NameDescription
Public methodUOPairT
Creates a new UOPair from new elements. The items may be the same and do not need to be in order. If T allows null, then null is allowed. If exactly one of e1 and e2 is null, then First will be null and Second will be non-null. The items must be IComparable{T}.
Top
Properties
  NameDescription
Public propertyElementsAreSame
True, if the elements are Equals; false, otherwise. If both elements are null, also true.
Public propertyFirst
The first of the two sorted items.
Public propertySecond
The second of the two sorted items.
Top
Methods
  NameDescription
Public methodCompareTo
Compares the UOPair to the other UOPair and returns an indication of their relative values (based on the ICompare of their elements).
Public methodEquals
Two UOPairs are equal if their (sorted) elements are equal.
(Overrides ValueTypeEquals(Object).)
Public methodGetEnumerator
Enumerates the pair in sorted order
Public methodGetHashCode
A hashcode such that two UOPairs{T} with the same elements will have the same hashcode. Depending on the subtypes, the hash code may be different on 32-bit and 64-bit machines
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Either (UO e1 e2) -- if elements differ -- or (UO 2x e)
(Overrides ValueTypeToString.)
Top
Operators
Extension Methods
  NameDescription
Public Extension MethodAppendT(T)Overloaded.
Yield an Enumeration of the list with the item appended to the end
(Defined by IEnumerableExtensions.)
Public Extension MethodAppendT(IEnumerableT)Overloaded.
Yield a concatenation of the two Enumerable lists
(Defined by IEnumerableExtensions.)
Public Extension MethodElementAtT
Returns the element at a specified index in a sequence.
(Defined by IEnumerableExtensions.)
Public Extension MethodForEachT(ActionT)Overloaded.
Calls an action on each element of a sequence. The action takes one argument: an element. It has no return value.
(Defined by IEnumerableExtensions.)
Public Extension MethodForEachT(ActionT, Int32)Overloaded.
Calls an action on each element of a sequence. The action takes two arguments: an element and the index of the element. It has no return value.
(Defined by IEnumerableExtensions.)
Public Extension MethodShuffleT
Shuffles the elements of a sequence.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoinOverloaded.
Creates a string from a sequence of elements. No delimiter is used.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoin(String)Overloaded.
Creates a delimited string from a sequence of elements.
(Defined by IEnumerableExtensions.)
Public Extension MethodStringJoin(String, Int32, String)Overloaded.
Creates a delimited string from a sequence of elements. At most maxLength elements will be used and "..." shows that more elements were in the list.
(Defined by IEnumerableExtensions.)
Public Extension MethodSubSequenceT
Take the items from a sequence starting with item # start (index 0) and contining for count items.
(Defined by IEnumerableExtensions.)
Public Extension MethodToHashSetTOverloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.)
Public Extension MethodToHashSetT(IEqualityComparerT)Overloaded.
Creates a HashSet from a sequence. If the sequence is already a HashSet, a new HashSet is still created.
(Defined by IEnumerableExtensions.)
Public Extension MethodToQueueT
Creates a Queue from a sequence. If the sequence is already a Queue, a new Queue is still created.
(Defined by IEnumerableExtensions.)
Top
See Also