maxon.Pair

Description

maxon.Pair provides in-place static storage for elements of arbitrary types.
It is similar to a maxon.Tuple, but supports only 2 elements.

Inheritance diagram

Inheritance

Parent Class:

Child Class:

Methods Signature

Get(ELEMENTTYPE) Returns an entry of the Pair.
GetFirst() Retrieves the first entry stored in the maxon.Pair.
GetSecond() Retrieves the second entry stored in the maxon.Pair.
GetTypeArguments() Retrieves the maxon.DataType from an argument
Set(ELEMENTTYPE, obj) Defines a value of the Pair.
SetReturnType(type) Defined the returned type.
__init__(typename) x.__init__(…) initializes x; see help(type(x)) for signature

Methods Definition

Pair.Get(ELEMENTTYPE)

Returns an entry of the Pair.

Parameters:ELEMENTTYPE (int) – The index of the element to retrieve from the this maxon.Pair.
Returns:The data stored
Return type:Any
Pair.GetFirst()

Retrieves the first entry stored in the maxon.Pair.

Returns:The first entry of this maxon.Pair.
Return type:Any
Pair.GetSecond()

Retrieves the second entry stored in the maxon.Pair.

Returns:The second entry of this maxon.Pair.
Return type:Any
Pair.GetTypeArguments()

Retrieves the maxon.DataType from an argument

Returns:The list of argument and maxon.DataType.
Return type:list[maxon.DataType, type)
Pair.Set(ELEMENTTYPE, obj)

Defines a value of the Pair.

Parameters:
  • ELEMENTTYPE (int) – The index of the element to set the value from the this maxon.Pair.
  • obj (Any) – The data to store stored
Pair.SetReturnType(type)

Defined the returned type.

Parameters:type – The return type expected.
Type:type
Pair.__init__(typename)

x.__init__(…) initializes x; see help(type(x)) for signature