Skip to content

Commit 689cf30

Browse files
committed
Added new modification to Modifiable
1 parent c6c8525 commit 689cf30

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerModificationFactory.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public static BigIntegerShiftRightModification shiftRight(final Integer shift) {
5757
return new BigIntegerShiftRightModification(shift);
5858
}
5959

60+
public static BigIntegerMultiplyModification multiply(final BigInteger factor) {
61+
return new BigIntegerMultiplyModification(factor);
62+
}
63+
6064
public static VariableModification<BigInteger> sub(final String subtrahend) {
6165
return sub(new BigInteger(subtrahend));
6266
}

src/main/java/de/rub/nds/modifiablevariable/util/Modifiable.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ public static ModifiableBigInteger shiftRightBigInteger(Integer i) {
173173
return getModifiableBigIntegerWithModification(BigIntegerModificationFactory.shiftRight(i));
174174
}
175175

176+
public static ModifiableBigInteger multiplyBigInteger(BigInteger i) {
177+
return getModifiableBigIntegerWithModification(BigIntegerModificationFactory.multiply(i));
178+
}
179+
176180
public static ModifiableInteger shiftRight(Integer i) {
177181
return getModifiableIntegerWithModification(IntegerModificationFactory.shiftRight(i));
178182
}

0 commit comments

Comments
 (0)