Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: mojo/public/java/system/src/org/chromium/mojo/system/Pair.java

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/java/system/src/org/chromium/mojo/system/Pair.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/Pair.java b/mojo/public/java/system/src/org/chromium/mojo/system/Pair.java
deleted file mode 100644
index 2ead0204f9c0a9ab95961e73b0cc9f6b1a56ca28..0000000000000000000000000000000000000000
--- a/mojo/public/java/system/src/org/chromium/mojo/system/Pair.java
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.mojo.system;
-
-
-/**
- * A pair of object.
- *
- * @param <F> Type of the first element.
- * @param <S> Type of the second element.
- */
-public class Pair<F, S> {
-
- public final F first;
- public final S second;
-
- /**
- * Dedicated constructor.
- *
- * @param first the first element of the pair.
- * @param second the second element of the pair.
- */
- public Pair(F first, S second) {
- this.first = first;
- this.second = second;
- }
-
- /**
- * equals() that handles null values.
- */
- private boolean equals(Object o1, Object o2) {
- return o1 == null ? o2 == null : o1.equals(o2);
- }
-
- /**
- * @see Object#equals(Object)
- */
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof Pair)) {
- return false;
- }
- Pair<?, ?> p = (Pair<?, ?>) o;
- return equals(first, p.first) && equals(second, p.second);
- }
-
- /**
- * @see Object#hashCode()
- */
- @Override
- public int hashCode() {
- return (first == null ? 0 : first.hashCode()) ^ (second == null ? 0 : second.hashCode());
- }
-
- /**
- * Helper method for creating a pair.
- *
- * @param a the first element of the pair.
- * @param b the second element of the pair.
- * @return the pair containing a and b.
- */
- public static <A, B> Pair<A, B> create(A a, B b) {
- return new Pair<A, B>(a, b);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698