Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/com/github/rjeschke/neetutils/collections/Tuple.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Patch Set: Removed newly added neetutils code Created April 25, 2014, 9:31 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/com/github/rjeschke/neetutils/collections/Tuple.java
diff --git a/src/com/github/rjeschke/neetutils/collections/Tuple.java b/src/com/github/rjeschke/neetutils/collections/Tuple.java
deleted file mode 100644
index 0f920e99446d3590b3596427bafe1f3ba4c58e5a..0000000000000000000000000000000000000000
--- a/src/com/github/rjeschke/neetutils/collections/Tuple.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2012 René Jeschke <rene_jeschke@yahoo.de>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.github.rjeschke.neetutils.collections;
-
-import com.github.rjeschke.neetutils.Objects;
-
-/**
- *
- * @author René Jeschke (rene_jeschke@yahoo.de)
- *
- * @param <A>
- * @param <B>
- */
-public class Tuple<A, B>
-{
- public final A a;
- public final B b;
-
- public Tuple(final A a, final B b)
- {
- this.a = a;
- this.b = b;
- }
-
- public final static <A, B> Tuple<A, B> of(final A a, final B b)
- {
- return new Tuple<A, B>(a, b);
- }
-
- @Override
- public int hashCode()
- {
- return (this.a == null ? 0 : this.a.hashCode()) * 31 + (this.b == null ? 0 : this.b.hashCode());
- }
-
- @Override
- public boolean equals(final Object obj)
- {
- if (obj == this)
- {
- return true;
- }
-
- if (!(obj instanceof Tuple))
- {
- return false;
- }
-
- final Tuple<?, ?> p = (Tuple<?, ?>)obj;
-
- return Objects.equals(this.a, p.a) && Objects.equals(this.b, p.b);
- }
-
- @Override
- public String toString()
- {
- return "(" + this.a.toString() + ", " + this.b.toString() + ")";
- }
-}

Powered by Google App Engine
This is Rietveld