We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8428198 commit 323178dCopy full SHA for 323178d
src/main/java/com/lewdev/probabilitylib/ProbabilityCollection.java
@@ -137,13 +137,14 @@ public boolean remove(E object) {
137
}
138
139
Iterator<ProbabilitySetElement<E>> it = this.iterator();
140
- boolean removed = it.hasNext();
+ boolean removed = false;
141
142
while(it.hasNext()) {
143
ProbabilitySetElement<E> entry = it.next();
144
if(entry.getObject().equals(object)) {
145
this.totalProbability -= entry.getProbability();
146
it.remove();
147
+ removed = true;
148
149
150
0 commit comments