net.amygdalum.util.text.linkeddawg.LinkedByteNavigator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compilerutils Show documentation
Show all versions of compilerutils Show documentation
Utility classes needed for search and compiler applications
The newest version!
package net.amygdalum.util.text.linkeddawg;
import net.amygdalum.util.text.ByteNavigator;
import net.amygdalum.util.text.ByteNode;
import net.amygdalum.util.text.WordSetNavigationException;
public class LinkedByteNavigator implements ByteNavigator> {
private ByteNode node;
public LinkedByteNavigator(ByteNode node) {
this.node = node;
}
@Override
public LinkedByteNavigator nextNode(byte b) {
node = node.nextNode(b);
if (node == null) {
throw new WordSetNavigationException("unexpected navigation to " + b);
}
return this;
}
@Override
public T getAttached() {
return node.getAttached();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy