public class LinkedListElement extends Object
Modifier and Type | Field and Description |
---|---|
LinkedListElement |
next |
LinkedListElement |
prev |
Constructor and Description |
---|
LinkedListElement() |
Modifier and Type | Method and Description |
---|---|
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) |
public LinkedListElement next
public LinkedListElement prev
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)