Skip to content
Permalink
Browse files

[#18] Improved hashCode() and toString() implementation

Changed code for multi-release compatibility.
  • Loading branch information...
knutwannheden committed Jun 7, 2019
1 parent cc62b55 commit a6e7cede6b66cc9cdaf4fcb26a8b5ebac7f22c4e
@@ -260,6 +260,9 @@ public double doubleValue() {

@Override
public int hashCode() {



return Short.valueOf(value).hashCode();
}

@@ -303,6 +303,9 @@ public BigInteger toBigInteger() {

@Override
public int hashCode() {



return Long.valueOf(value).hashCode();
}

@@ -188,6 +188,9 @@ public double doubleValue() {

@Override
public int hashCode() {



return Long.valueOf(value).hashCode();
}

@@ -151,6 +151,9 @@ public BigInteger toBigInteger() {

@Override
public int hashCode() {



return Integer.valueOf(value).hashCode();
}

@@ -260,7 +260,10 @@ public double doubleValue() {

@Override
public int hashCode() {
return Short.hashCode(value);
/* [java-8] */
if (true) return Short.hashCode(value);
/* [/java-8] */
return Short.valueOf(value).hashCode();
}

@Override
@@ -303,7 +303,10 @@ public BigInteger toBigInteger() {

@Override
public int hashCode() {
return Long.hashCode(value);
/* [java-8] */
if (true) return Long.hashCode(value);
/* [/java-8] */
return Long.valueOf(value).hashCode();
}

@Override
@@ -188,7 +188,10 @@ public double doubleValue() {

@Override
public int hashCode() {
return Long.hashCode(value);
/* [java-8] */
if (true) return Long.hashCode(value);
/* [/java-8] */
return Long.valueOf(value).hashCode();
}

@Override
@@ -151,7 +151,10 @@ public BigInteger toBigInteger() {

@Override
public int hashCode() {
return Integer.hashCode(value);
/* [java-8] */
if (true) return Integer.hashCode(value);
/* [/java-8] */
return Integer.valueOf(value).hashCode();
}

@Override

0 comments on commit a6e7ced

Please sign in to comment.
You can’t perform that action at this time.