From 9009b8fd54a29d5c6d61f3447e1f4f24f1ac7782 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@maiil.ru> Date: Sun, 23 Dec 2018 11:57:26 +0100 Subject: [PATCH] Removed the equals and hash code overrides and unused imports --- src/opensesim/world/AssetPair.java | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/opensesim/world/AssetPair.java b/src/opensesim/world/AssetPair.java index 1a60153..32886af 100644 --- a/src/opensesim/world/AssetPair.java +++ b/src/opensesim/world/AssetPair.java @@ -25,9 +25,6 @@ */ package opensesim.world; -import java.util.Objects; -import opensesim.world.AbstractAsset; - /** * @@ -38,7 +35,7 @@ public class AssetPair { private final AbstractAsset asset; private final AbstractAsset currency; - public static String buildSymbol(String currency,String asset){ + public static String buildSymbol(String asset,String currency){ return currency+"/"+asset; } @@ -63,27 +60,5 @@ public class AssetPair { this.asset = world.getAssetBySymbol(asset); this.currency = world.getAssetBySymbol(currency); } - - - @Override - public boolean equals(Object o) { - - AssetPair ap = (AssetPair)o; - if (ap.asset==this.asset && ap.currency==this.currency) - return true; - // if (ap.asset==currency && ap.currency==asset) - // return false; - return false; - } - - @Override - public int hashCode() { - int hash = 5; - hash = 97 * hash + Objects.hashCode(this.asset); - hash = 97 * hash + Objects.hashCode(this.currency); - return hash; - } - - }