MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Triple

Class Triple

src/main/java/field/utility/Triple.java:6–42  ·  view source on GitHub ↗

Created by marc on 3/25/14.

Source from the content-addressed store, hash-verified

4 * Created by marc on 3/25/14.
5 */
6public class Triple<A, B, C> extends Pair<A,B> {
7 final public C third;
8
9 public Triple(A first, B second, C third) {
10 super(first, second);
11 this.third = third;
12 }
13
14 @Override
15 public boolean equals(Object o) {
16 if (this == o) return true;
17 if (!(o instanceof Triple)) return false;
18 if (!super.equals(o)) return false;
19
20 Triple triple = (Triple) o;
21
22 return !(third != null ? !third.equals(triple.third) : triple.third != null);
23
24 }
25
26 @Override
27 public int hashCode() {
28 int result = super.hashCode();
29 result = 31 * result + (third != null ? third.hashCode() : 0);
30 return result;
31 }
32
33 @Override
34 public String toString() {
35 return "Triple{" + first + "," + second + ","+third+"}";
36 }
37
38 @Override
39 public Triple<A, B, C> duplicate() {
40 return new Triple<>(first instanceof Mutable ? (A) ((Mutable)first).duplicate() : first, second instanceof Mutable ? (B) ((Mutable)second).duplicate() : second, third instanceof Mutable ? (C) ((Mutable)third).duplicate() : third);
41 }
42}

Callers 10

coallesceMethod · 0.85
loadedMethod · 0.85
defaultShaderMethod · 0.85
withTextureMethod · 0.85
withStereoTextureMethod · 0.85
withWebcamMethod · 0.85
withImageSequenceMethod · 0.85
withStageMethod · 0.85
PointCloudClass · 0.85
submitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected