class ModularInteger extends Object
value is between 0 and m - 1 for some modulus m.
This object is immutable; all operations create a new object.
| Constructor and Description |
|---|
ModularInteger(int value,
int modulus)
Creates a ModularInteger.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
get() |
int |
hashCode() |
ModularInteger |
minus(int operand) |
ModularInteger |
plus(int operand) |
String |
toString() |
public int get()
public ModularInteger plus(int operand)
public ModularInteger minus(int operand)
Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.