Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private FunctionNode getNodeByIndex(int index) {
- if (index < 0) throw new FunctionPointIndexOutOfBoundsException("Incorrect index");
- if (currentIndex <= index) {
- while (currentIndex < index) {
- currentFunctionNode = currentFunctionNode.pointNext;
- ++currentIndex;
- }
- } else {
- while (index < currentIndex) {
- currentFunctionNode = currentFunctionNode.pointPrev;
- --currentIndex;
- }
- }
- return currentFunctionNode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement