Removed the equals and hash code overrides and unused imports
This commit is contained in:
parent
75443ebc79
commit
9009b8fd54
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user