| /** |
| * Copyright (c) 2013, 2016 - Loetz GmbH&Co.KG, 69115 Heidelberg, Germany |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.xtext.datamartdsl.jvmmodel; |
| |
| @SuppressWarnings("all") |
| public class Triple<S1 extends Object, S2 extends Object, S3 extends Object> { |
| private S1 firstElement; |
| |
| private S2 secondElement; |
| |
| private S3 thirdElement; |
| |
| public Triple(final S1 f, final S2 s, final S3 t) { |
| this.firstElement = f; |
| this.secondElement = s; |
| this.thirdElement = t; |
| } |
| |
| public S1 getFirst() { |
| return this.firstElement; |
| } |
| |
| public S2 getSecond() { |
| return this.secondElement; |
| } |
| |
| public S3 getThird() { |
| return this.thirdElement; |
| } |
| |
| @Override |
| public boolean equals(final Object other) { |
| if ((other == null)) { |
| return false; |
| } |
| if ((other == this)) { |
| return true; |
| } |
| if ((other instanceof Triple<?, ?, ?>)) { |
| Triple<?, ?, ?> r = ((Triple<?, ?, ?>) other); |
| if ((this.firstElement == null)) { |
| Object _first = r.getFirst(); |
| return (_first == null); |
| } else { |
| this.firstElement.equals(r.getFirst()); |
| } |
| if ((this.secondElement == null)) { |
| Object _second = r.getSecond(); |
| return (_second == null); |
| } else { |
| this.secondElement.equals(r.getSecond()); |
| } |
| if ((this.thirdElement == null)) { |
| Object _third = r.getThird(); |
| return (_third == null); |
| } else { |
| this.thirdElement.equals(r.getThird()); |
| } |
| } |
| return false; |
| } |
| |
| @Override |
| public int hashCode() { |
| int fhc = 0; |
| int shc = 0; |
| int thc = 0; |
| if ((this.firstElement != null)) { |
| fhc = this.firstElement.hashCode(); |
| } |
| if ((this.secondElement != null)) { |
| shc = this.secondElement.hashCode(); |
| } |
| if ((this.thirdElement != null)) { |
| thc = this.thirdElement.hashCode(); |
| } |
| return ((fhc + (17 * shc)) + (31 * thc)); |
| } |
| |
| @Override |
| public String toString() { |
| S1 _first = this.getFirst(); |
| String _plus = ("Triple(" + _first); |
| String _plus_1 = (_plus + ","); |
| S2 _second = this.getSecond(); |
| String _plus_2 = (_plus_1 + _second); |
| String _plus_3 = (_plus_2 + ","); |
| S3 _third = this.getThird(); |
| String _plus_4 = (_plus_3 + _third); |
| return (_plus_4 + ")"); |
| } |
| } |