Skip to content

Commit

Permalink
Change the hashCode() function of all Modifications, so they have a b…
Browse files Browse the repository at this point in the history
…it more semantic. There is no real reason for this change. Now the magic numbers, are a little bit less magic (just counting up the different modifications)
  • Loading branch information
C0D3D3V committed Nov 21, 2024
1 parent fc9d71b commit 8599859
Show file tree
Hide file tree
Showing 31 changed files with 51 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public VariableModification<BigInteger> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 41 * hash + Objects.hashCode(this.summand);
hash = 51 * hash + Objects.hashCode(this.summand);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public VariableModification<BigInteger> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 41 * hash + Objects.hashCode(this.explicitValue);
int hash = 7;
hash = 52 * hash + Objects.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public VariableModification<BigInteger> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 61 * hash + Objects.hashCode(this.factor);
int hash = 7;
hash = 53 * hash + Objects.hashCode(this.factor);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public VariableModification<BigInteger> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + this.shift;
hash = 54 * hash + this.shift;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public VariableModification<BigInteger> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + this.shift;
hash = 55 * hash + this.shift;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public VariableModification<BigInteger> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 61 * hash + Objects.hashCode(this.subtrahend);
int hash = 7;
hash = 56 * hash + Objects.hashCode(this.subtrahend);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public VariableModification<BigInteger> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + Objects.hashCode(this.xor);
hash = 57 * hash + Objects.hashCode(this.xor);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public VariableModification<Boolean> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 29 * hash + (this.explicitValue ? 1 : 0);
hash = 21 * hash + (this.explicitValue ? 1 : 0);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public VariableModification<byte[]> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 89 * hash + this.count;
hash = 89 * hash + this.startPosition;
hash = 81 * hash + this.count;
hash = 81 * hash + this.startPosition;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public VariableModification<byte[]> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 53 * hash + Arrays.hashCode(this.explicitValue);
int hash = 7;
hash = 82 * hash + Arrays.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public VariableModification<byte[]> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 59 * hash + Arrays.hashCode(this.bytesToInsert);
hash = 59 * hash + this.startPosition;
hash = 83 * hash + Arrays.hashCode(this.bytesToInsert);
hash = 83 * hash + this.startPosition;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public VariableModification<byte[]> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 71 * hash + Arrays.hashCode(this.shuffle);
int hash = 7;
hash = 84 * hash + Arrays.hashCode(this.shuffle);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public VariableModification<byte[]> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + Arrays.hashCode(this.xor);
hash = 97 * hash + this.startPosition;
hash = 85 * hash + Arrays.hashCode(this.xor);
hash = 85 * hash + this.startPosition;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public VariableModification<Integer> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 23 * hash + Objects.hashCode(this.summand);
int hash = 7;
hash = 31 * hash + Objects.hashCode(this.summand);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public VariableModification<Integer> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 53 * hash + Objects.hashCode(this.explicitValue);
hash = 32 * hash + Objects.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public VariableModification<Integer> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 73 * hash + this.shift;
hash = 33 * hash + this.shift;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public VariableModification<Integer> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 59 * hash + this.shift;
int hash = 7;
hash = 34 * hash + this.shift;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public VariableModification<Integer> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 23 * hash + Objects.hashCode(this.subtrahend);
hash = 35 * hash + Objects.hashCode(this.subtrahend);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public VariableModification<Integer> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 97 * hash + Objects.hashCode(this.xor);
int hash = 7;
hash = 36 * hash + Objects.hashCode(this.xor);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public VariableModification<Long> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 43 * hash + Objects.hashCode(this.summand);
hash = 41 * hash + Objects.hashCode(this.summand);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public VariableModification<Long> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 43 * hash + Objects.hashCode(this.explicitValue);
int hash = 7;
hash = 42 * hash + Objects.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public VariableModification<Long> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 97 * hash + Objects.hashCode(this.subtrahend);
hash = 43 * hash + Objects.hashCode(this.subtrahend);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public VariableModification<Long> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 59 * hash + Objects.hashCode(this.xor);
int hash = 7;
hash = 44 * hash + Objects.hashCode(this.xor);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public VariableModification<Byte> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 17 * hash + Objects.hashCode(this.summand);
int hash = 7;
hash = 11 * hash + Objects.hashCode(this.summand);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public VariableModification<Byte> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 79 * hash + Objects.hashCode(this.explicitValue);
hash = 12 * hash + Objects.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public VariableModification<Byte> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 71 * hash + Objects.hashCode(this.subtrahend);
int hash = 7;
hash = 13 * hash + Objects.hashCode(this.subtrahend);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public VariableModification<Byte> getModifiedCopy() {
@Override
public int hashCode() {
int hash = 7;
hash = 89 * hash + Objects.hashCode(this.xor);
hash = 14 * hash + Objects.hashCode(this.xor);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public VariableModification<String> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 4;
hash = 83 * hash + Objects.hashCode(this.appendValue);
int hash = 7;
hash = 61 * hash + Objects.hashCode(this.appendValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public VariableModification<String> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 3;
hash = 83 * hash + Objects.hashCode(this.explicitValue);
int hash = 7;
hash = 62 * hash + Objects.hashCode(this.explicitValue);
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public VariableModification<String> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 4;
hash = 83 * hash + Objects.hashCode(this.insertValue);
hash = 83 * hash + this.startPosition;
int hash = 7;
hash = 63 * hash + Objects.hashCode(this.insertValue);
hash = 63 * hash + this.startPosition;
return hash;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public VariableModification<String> getModifiedCopy() {

@Override
public int hashCode() {
int hash = 5;
hash = 83 * hash + Objects.hashCode(this.prependValue);
int hash = 7;
hash = 64 * hash + Objects.hashCode(this.prependValue);
return hash;
}

Expand Down

0 comments on commit 8599859

Please sign in to comment.