Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
5c26bc18
Commit
5c26bc18
authored
Nov 02, 2022
by
Julian Zobel
Browse files
Comments
parent
7b731771
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/util/Either.java
View file @
5c26bc18
...
...
@@ -20,11 +20,20 @@
package
de.tud.kom.p2psim.impl.util
;
/**
* Like a {@link Tuple}, but one or both elements can be null. Used for a long time, never documented.
*
* @author ?
* @version ?
*
* @param <A>
* @param <B>
*/
public
class
Either
<
A
,
B
>
{
private
A
left
=
null
;
private
B
right
=
null
;
protected
Either
(
A
a
,
B
b
)
{
protected
Either
(
A
a
,
B
b
)
{
left
=
a
;
right
=
b
;
}
...
...
src/de/tud/kom/p2psim/impl/util/Triple.java
View file @
5c26bc18
...
...
@@ -20,7 +20,12 @@
package
de.tud.kom.p2psim.impl.util
;
/**
* It's a triple. Used for a long time, never documented.
*
* @version ?
* @author ?
*/
public
class
Triple
<
A
,
B
,
C
>
{
private
A
a
;
...
...
src/de/tud/kom/p2psim/impl/util/Tuple.java
View file @
5c26bc18
...
...
@@ -29,16 +29,24 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map.Entry
;
public
class
Tuple
<
T1
,
T2
>
{
/**
* It's a tuple. Used for a long time, never documented.
*
* @version ?
* @author ?
* @param <A>
* @param <B>
*/
public
class
Tuple
<
A
,
B
>
{
T1
a
;
T2
b
;
A
a
;
B
b
;
public
Tuple
()
{
}
public
Tuple
(
T1
a
,
T2
b
)
{
public
Tuple
(
A
a
,
B
b
)
{
super
();
this
.
a
=
a
;
this
.
b
=
b
;
...
...
@@ -49,16 +57,16 @@ public class Tuple<T1, T2> {
return
"("
+
a
+
", "
+
b
+
")"
;
}
public
T1
getA
()
{
public
A
getA
()
{
return
a
;
}
public
void
setA
(
T1
a
)
{
public
void
setA
(
A
a
)
{
this
.
a
=
a
;
}
public
T2
getB
()
{
public
B
getB
()
{
return
b
;
}
public
void
setB
(
T2
b
)
{
public
void
setB
(
B
b
)
{
this
.
b
=
b
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment