|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.util.LinkedListElement
This is a utility class which can be the building blocks of linked list implementation. It has a native method to quickly traverse the list in both direction.
| Field Summary | |
LinkedListElement |
next
|
LinkedListElement |
prev
|
| Constructor Summary | |
LinkedListElement()
|
|
| Method Summary | |
static void |
addSectionAfter(LinkedListElement after,
LinkedListElement startToAdd)
|
static void |
addSectionBefore(LinkedListElement before,
LinkedListElement startToAdd)
|
static int |
countInRange(LinkedListElement start,
LinkedListElement end)
Counts the number of elements in the inclusive range start -> end. |
static int |
countNext(LinkedListElement start)
Count how many are in the list starting from (and including) start. |
static int |
countPrev(LinkedListElement start)
Count how many are in the list starting from (and including) start going backwards. |
static LinkedListElement |
getNext(LinkedListElement start,
int elements)
Starting from the "start" element count "elements" units down. |
static LinkedListElement |
getPrev(LinkedListElement start,
int elements)
Starting from the "start" element count "elements" units back. |
static void |
removeSection(LinkedListElement start,
LinkedListElement last)
|
static void |
replaceSection(LinkedListElement start,
LinkedListElement end,
LinkedListElement newSection)
This replaces a section of elements with a new section. |
static void |
toArray(LinkedListElement first,
int length,
LinkedListElement[] elements)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public LinkedListElement next
public LinkedListElement prev
| Constructor Detail |
public LinkedListElement()
| Method Detail |
public static LinkedListElement getNext(LinkedListElement start,
int elements)
public static LinkedListElement getPrev(LinkedListElement start,
int elements)
public static void removeSection(LinkedListElement start,
LinkedListElement last)
public static void addSectionAfter(LinkedListElement after,
LinkedListElement startToAdd)
public static void addSectionBefore(LinkedListElement before,
LinkedListElement startToAdd)
public static void replaceSection(LinkedListElement start,
LinkedListElement end,
LinkedListElement newSection)
public static int countNext(LinkedListElement start)
public static int countPrev(LinkedListElement start)
public static int countInRange(LinkedListElement start,
LinkedListElement end)
public static void toArray(LinkedListElement first,
int length,
LinkedListElement[] elements)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||