Click or drag to resize

PairTKey, TValue Class

Defines a key/value pair that is mutable and supports Jumbo's IWritable serialization protocol.
Inheritance Hierarchy
SystemObject
  Ookii.Jumbo.IOPairTKey, TValue

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public sealed class Pair<TKey, TValue> : IWritable, 
	IComparable<Pair<TKey, TValue>>, IEquatable<Pair<TKey, TValue>>, 
	ICloneable

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

The PairTKey, TValue type exposes the following members.

Constructors
  NameDescription
Public methodPairTKey, TValue
Initializes a new instance of the PairTKey, TValue class.
Public methodPairTKey, TValue(TKey, TValue)
Initializes a new instance of the PairTKey, TValue class with the specified key and value.
Top
Properties
  NameDescription
Public propertyKey
Gets or sets the key in the key/value pair.
Public propertyValue
Gets or sets the value in the key/value pair.
Top
Methods
  NameDescription
Public methodCompareTo
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current PairTKey, TValue.
(Overrides ObjectEquals(Object).)
Public methodEquals(PairTKey, TValue)
Determines whether the specified PairTKey, TValue is equal to the current PairTKey, TValue.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRead
Reads the object from the specified reader.
Public methodToString
Gets a string representation of the current PairTKey, TValue.
(Overrides ObjectToString.)
Public methodWrite
Writes the object to the specified writer.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two specified PairTKey, TValue objects have the same value.
Public operatorStatic memberGreaterThan
Determines whether one specified PairTKey, TValue is greater than another specified PairTKey, TValue
Public operatorStatic memberGreaterThanOrEqual
Determines whether one specified PairTKey, TValue is greater than or equal to another specified PairTKey, TValue
Public operatorStatic memberInequality
Determines whether two specified PairTKey, TValue objects have different values.
Public operatorStatic memberLessThan
Determines whether one specified PairTKey, TValue is less than another specified PairTKey, TValue
Public operatorStatic memberLessThanOrEqual
Determines whether one specified PairTKey, TValue is less than or equal to another specified PairTKey, TValue
Top
Remarks

Jumbo does not support the use of KeyValuePairTKey, TValue as a record type. You must use PairTKey, TValue instead.

The IComparableT implementation of this class uses the key only; it ignores the value. IEquatableT does use both the key and value.

See Also