Starsector API
Loading...
Searching...
No Matches
Pair.java
Go to the documentation of this file.
1
package
com.fs.starfarer.api.util;
2
3
12
public
class
Pair
<
A
,
B
> {
13
public
A
one
;
14
public
B
two
;
15
16
public
Pair
() {}
17
18
public
Pair
(
A
one
,
B
two
) {
19
super
();
20
this.one =
one
;
21
this.two =
two
;
22
}
23
24
@
Override
25
public
int
hashCode
() {
26
final
int
PRIME
= 31;
27
int
result = 1;
28
result =
PRIME
* result + ((
one
==
null
) ? 0 :
one
.hashCode());
29
result =
PRIME
* result + ((
two
==
null
) ? 0 :
two
.hashCode());
30
return
result;
31
}
32
@
SuppressWarnings
(
"unchecked"
)
33
@
Override
34
public
boolean
equals
(
Object
obj
) {
35
if
(
this
==
obj
)
36
return
true
;
37
if
(
obj
==
null
)
38
return
false
;
39
if
(
getClass
() !=
obj
.getClass())
40
return
false
;
41
final
Pair
other = (
Pair
)
obj
;
42
if
(
one
==
null
) {
43
if
(other.
one
!=
null
)
44
return
false
;
45
}
else
if
(!
one
.equals(other.
one
))
46
return
false
;
47
if
(
two
==
null
) {
48
if
(other.
two
!=
null
)
49
return
false
;
50
}
else
if
(!
two
.equals(other.
two
))
51
return
false
;
52
return
true
;
53
}
54
}
com.fs.starfarer.api.util.Pair
Definition
Pair.java:12
com.fs.starfarer.api.util.Pair.Pair
Pair()
Definition
Pair.java:16
com.fs.starfarer.api.util.Pair.two
B two
Definition
Pair.java:14
com.fs.starfarer.api.util.Pair.hashCode
int hashCode()
Definition
Pair.java:25
com.fs.starfarer.api.util.Pair.Pair
Pair(A one, B two)
Definition
Pair.java:18
com.fs.starfarer.api.util.Pair.one
A one
Definition
Pair.java:13
com.fs.starfarer.api.util.Pair.equals
boolean equals(Object obj)
Definition
Pair.java:34
com.fs.starfarer.api.util.TimeoutTracker
Definition
TimeoutTracker.java:8
src
com
fs
starfarer
api
util
Pair.java
Generated by
1.9.8