Go to most recent revision |
Blame |
Last modification |
View Log
| RSS feed
package de.viathinksoft.distributed.apps.immortal.iterator.marschall.legacy;
import java.math.BigInteger;
import java.util.Iterator;
import de.viathinksoft.distributed.apps.immortal.exception.InitialNumberNotImmortableException;
import de.viathinksoft.distributed.apps.immortal.iterator.QuickImmortableCheck;
//TODO: Iterable aufspalten?
public MarschallIterator
(BigInteger start
) throws InitialNumberNotImmortableException
{
if (!QuickImmortableCheck.check(start)) {
throw new InitialNumberNotImmortableException();
}
this.position = start;
}
public boolean hasNext() {
return true;
}
String s = position.
toString();
do {
chk =
new BigInteger(prefixTrial.
toString().
concat(s
));
} while (!QuickImmortableCheck.check(chk));
position = chk;
return position;
}
public void remove() {
}
return this;
}
}