Package | com.yworks.yfiles.util |
Class | public class Tuple |
Inheritance | Tuple YObject Object |
equals()
and hashCode()
.
Therefore it can safely be used within HashTables, HashSets, HashMaps and the like. Using the static create
methods, it is possible to build 3,4,5-Tuples recursively out of multiple 2-Tuples.
Property | Defined By | ||
---|---|---|---|
o1 : Object [read-only]
The first element of the Tuple
| Tuple | ||
o2 : Object [read-only]
The second element of the Tuple
| Tuple |
Method | Defined By | ||
---|---|---|---|
Tuple(o1:Object, o2:Object, init:Boolean = true)
Constructs a 2-Tuple using the two given Objects
| Tuple | ||
create(o1:Object, o2:Object):Object [static]
Factory method to create a 2-Tuple
| Tuple | ||
createFiveTuple(o1:Object, o2:Object, o3:Object, o4:Object, o5:Object):Object [static]
Factory method to create a 5-Tuple
| Tuple | ||
createFourTuple(o1:Object, o2:Object, o3:Object, o4:Object):Object [static]
Factory method to create a 4-Tuple
| Tuple | ||
createThreeTuple(o1:Object, o2:Object, o3:Object):Object [static]
Factory method to create a 3-Tuple
| Tuple | ||
equals(o:Object):Boolean [override]
Determines if the given Tuple equals another Tuple. | Tuple | ||
getClass():Class [override] | Tuple | ||
hashCode():int [override]
Generates a hashCode using the two tuple elements. | Tuple | ||
[static]
Constructs a 2-Tuple using the two given Objects
| Tuple | ||
toString():String | Tuple |
Method | Defined By | ||
---|---|---|---|
initTuple(o1:Object, o2:Object):void
Initializes this object. | Tuple |
o1 | property |
o1:Object
[read-only] The first element of the Tuple
public function get o1():Object
o2 | property |
o2:Object
[read-only] The second element of the Tuple
public function get o2():Object
Tuple | () | Constructor |
public function Tuple(o1:Object, o2:Object, init:Boolean = true)
Constructs a 2-Tuple using the two given Objects
Parameterso1:Object — The first element (may be null )
| |
o2:Object — The second element (may be null )
| |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
create | () | method |
public static function create(o1:Object, o2:Object):Object
Factory method to create a 2-Tuple
Parameters
o1:Object | |
o2:Object |
Object |
createFiveTuple | () | method |
public static function createFiveTuple(o1:Object, o2:Object, o3:Object, o4:Object, o5:Object):Object
Factory method to create a 5-Tuple
Parameters
o1:Object | |
o2:Object | |
o3:Object | |
o4:Object | |
o5:Object |
Object |
createFourTuple | () | method |
public static function createFourTuple(o1:Object, o2:Object, o3:Object, o4:Object):Object
Factory method to create a 4-Tuple
Parameters
o1:Object | |
o2:Object | |
o3:Object | |
o4:Object |
Object |
createThreeTuple | () | method |
public static function createThreeTuple(o1:Object, o2:Object, o3:Object):Object
Factory method to create a 3-Tuple
Parameters
o1:Object | |
o2:Object | |
o3:Object |
Object |
equals | () | method |
override public function equals(o:Object):Boolean
Determines if the given Tuple equals another Tuple.
Returns true iff both elements are equal (both null or equals() returns true
.
Parameters
o:Object — the element to compare this tuple with
|
Boolean — true iff o equals this
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
hashCode | () | method |
override public function hashCode():int
Generates a hashCode using the two tuple elements.
Returnsint — a hashCode built using the hashCodes of the two elements.
|
initTuple | () | method |
protected final function initTuple(o1:Object, o2:Object):void
Initializes this object. See the documentation of the corresponding factory method newTuple()
for details.
Parameters
o1:Object | |
o2:Object |
See also
newTuple | () | method |
public static function newTuple(o1:Object, o2:Object):Tuple
Constructs a 2-Tuple using the two given Objects
Parameters
o1:Object — The first element (may be null )
| |
o2:Object — The second element (may be null )
|
Tuple |
toString | () | method |
public function toString():String
ReturnsString |