NanoByte.Common  2.7.0
NanoByte.Common.Collections.ComparableTuple< T > Struct Template Reference

Represents a tuple of comparable elements. More...

Inheritance diagram for NanoByte.Common.Collections.ComparableTuple< T >:

Public Member Functions

 ComparableTuple (T key, T value)
 Creates a new comparable tuple. More...
 
override string ToString ()
 Returns the tuple in the form "Key = Value". Not safe for parsing! More...
 
bool Equals (ComparableTuple< T > other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
int CompareTo (ComparableTuple< T > other)
 

Static Public Member Functions

static bool operator== (ComparableTuple< T > left, ComparableTuple< T > right)
 
static bool operator!= (ComparableTuple< T > left, ComparableTuple< T > right)
 
static bool operator< (ComparableTuple< T > left, ComparableTuple< T > right)
 
static bool operator> (ComparableTuple< T > left, ComparableTuple< T > right)
 
static bool operator<= (ComparableTuple< T > left, ComparableTuple< T > right)
 
static bool operator>= (ComparableTuple< T > left, ComparableTuple< T > right)
 

Public Attributes

readonly T Key
 The first element of the tuple. More...
 
readonly T Value
 The second element of the tuple. More...
 

Detailed Description

Represents a tuple of comparable elements.

Type Constraints
T :IEquatable<T> 
T :IComparable<T> 

Constructor & Destructor Documentation

◆ ComparableTuple()

NanoByte.Common.Collections.ComparableTuple< T >.ComparableTuple ( key,
value 
)
inline

Creates a new comparable tuple.

Parameters
keyThe first element of the tuple.
valueThe second element of the tuple.

Member Function Documentation

◆ ToString()

override string NanoByte.Common.Collections.ComparableTuple< T >.ToString ( )

Returns the tuple in the form "Key = Value". Not safe for parsing!

Member Data Documentation

◆ Key

The first element of the tuple.

◆ Value

The second element of the tuple.


The documentation for this struct was generated from the following file: