Skip to content
Snippets Groups Projects
Commit a4045bb4 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'dev' into 'master'

collision log

See merge request !15
parents ecd63c43 7a475cd3
Branches
No related tags found
1 merge request!15collision log
Pipeline #639305 passed
......@@ -8,7 +8,7 @@
<groupId>montisim</groupId>
<artifactId>commons</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<properties>
......
package de.rwth.montisim.commons.utils;
public class Triplet<Type1,Type2,Type3>{
public final Type1 x;
public final Type2 y;
public final Type3 z;
public Triplet(Type1 x,Type2 y,Type3 z){
this.x = x;
this.y = y;
this.z = z;
}
public Object getAt(int index){
if(index == 0) return (Object) this.x;
if(index == 1) return (Object) this.y;
if(index == 2) return (Object) this.z;
throw new IndexOutOfBoundsException("Accessing triplet at index: " + index);
}
public boolean equals(Triplet compare){
if(!x.equals(compare.x)) return false;
if(!y.equals(compare.y)) return false;
if(!z.equals(compare.z)) return false;
return true;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment