Bridges-Java
3.4.3
Bridges(Java API)
|
This class can be used to instantiate Circular Doubly Linked List Elements.
Structurally they are the same as doubly linked elements except that each node constructed with the next and the previous pointers points to itself.
User's implementation of the circularly linked list needs to ensure that the last node's next pointer points to the first node and the first node's previous pointer points to the last node, as the visualization generation is dependent on this.
Elements have labels (string) that are displayed on the visualization. Elements take an generic object E as a user defined parameter, which can be any native type or object.
Elements contain a visualizer (ElementVisualizer) object for setting visual attributes (color, shape, opacity, size), necessary for displaying them in a web browser.
Elements also have a LinkVisualizer object that is used when they are linked to another element, appropriate for setting link attributes, between the element and its previous or next nodes.
E | the generic parameter object that contains application specific data, defined by the user when instantiating this object. |
Classes | |
class | CircDLelementIterator |
Implements an iterator on the Circular doubly linked element for ease iterating over lists. More... | |
class | CircDLelementReverseIterator |
Implements a reverse iterator on the Circular doubly linked element for ease iterating over lists. More... | |
Public Member Functions | |
CircDLelement () | |
CircDLelement (String label, E e) | |
CircDLelement (CircDLelement< E > next, CircDLelement< E > prev) | |
CircDLelement (E e, CircDLelement< E > next, CircDLelement< E > prev) | |
String | getDataStructType () |
CircDLelement< E > | getNext () |
CircDLelement< E > | getPrev () |
Iterator< E > | iterator () |
Iterator< E > | reverse_iterator () |
Public Member Functions inherited from bridges.base.DLelement< E > | |
DLelement () | |
DLelement (String label, E e) | |
DLelement (DLelement< E > next, DLelement< E > prev) | |
DLelement (E e, DLelement< E > next, DLelement< E > prev) | |
void | setNext (DLelement< E > nxt) |
void | setPrev (DLelement< E > prv) |
String | getDataStructureRepresentation () |
Public Member Functions inherited from bridges.base.SLelement< E > | |
SLelement () | |
SLelement (String label, E e) | |
SLelement (E e, SLelement< E > next) | |
SLelement (E e) | |
SLelement (SLelement< E > next) | |
void | setNext (SLelement< E > next) |
String | toString () |
Public Member Functions inherited from bridges.base.Element< E > | |
Element () | |
Element constructor. More... | |
Element (E val) | |
the constructor of Element More... | |
Element (String label, E val) | |
Constructor of Element. More... | |
Element (Element< E > original) | |
performing deep copy of an element when needed More... | |
String | getIdentifier () |
void | setSize (double sz) |
void | setColor (Color col) |
Color | getColor () |
void | setOpacity (float opacity) |
double | getOpacity () |
void | setShape (String aShape) |
ElementVisualizer | getVisualizer () |
void | setVisualizer (ElementVisualizer visualizer) |
LinkVisualizer | getLinkVisualizer (Element< E > el) |
Returns the Element's link visualizer object. More... | |
String | getClassName () |
int | compareTo (Element< E > e1) |
boolean | equals (Element< E > e1) |
String | getElementRepresentation () |
String | getLinkRepresentation (LinkVisualizer lv, String src, String dest) |
String | getLabel () |
void | setLabel (String label) |
E | getValue () |
void | setValue (E value) |
double | getSize () |
void | setColor (String col) |
Change the element color. More... | |
String | getShape () |
void | setLocation (double locX, double locY) |
Set the location attributes of an element. More... | |
double | getLocationX () |
double | getLocationY () |
Additional Inherited Members | |
Protected Member Functions inherited from bridges.base.SLelement< E > | |
void | getListElements (Vector< Element< E >> nodes) |
Protected Member Functions inherited from bridges.base.Element< E > | |
void | setLinkVisualizer (Element< E > el) |
Sets the link from this element to a new incoming element. More... | |
void | removeLinkVisualizer (Element< E > el) |
Removes the link from this element to a new incoming element. More... | |
void | validateVal (E value) |
Protected Attributes inherited from bridges.base.DLelement< E > | |
DLelement< E > | prev |
Protected Attributes inherited from bridges.base.SLelement< E > | |
SLelement< E > | next = null |
Protected Attributes inherited from bridges.base.DataStruct | |
String | QUOTE = "\"" |
Package Attributes inherited from bridges.base.DataStruct | |
String | COMMA = "," |
String | COLON = ":" |
String | OPEN_CURLY = "{" |
String | CLOSE_CURLY = "}" |
String | OPEN_PAREN = "(" |
String | CLOSE_PAREN = ")" |
String | OPEN_BOX = "[" |
String | CLOSE_BOX = "]" |
Static Package Attributes inherited from bridges.base.Element< E > | |
static Integer | ids = 0 |
bridges.base.CircDLelement< E >.CircDLelement | ( | ) |
Constructs an empty CircDLelement with next and prev pointers set to itself
bridges.base.CircDLelement< E >.CircDLelement | ( | String | label, |
E | e | ||
) |
Constructs a CircDLelement labeled "label", holding an object "e", with next and prev pointers set to itself
label | the label for this CircDLelement that shows up on the Bridges visualization |
e | the genereic object that this CircDLelement is holding |
bridges.base.CircDLelement< E >.CircDLelement | ( | CircDLelement< E > | next, |
CircDLelement< E > | prev | ||
) |
Constructs an empty DLelement with the next pointer set to the CircDLelement "next" and the prev pointer set to CircDLelement "prev".
bridges.base.CircDLelement< E >.CircDLelement | ( | E | e, |
CircDLelement< E > | next, | ||
CircDLelement< E > | prev | ||
) |
Constructs a DLelement holding an object "e", with the next pointer set to the DLelement "next" and the prev pointer set to DLelement "prev".
e | the generic object that this CircDLelement is holding |
next | the CircDLelement that should be assigned to the next pointer |
prev | the CircDLelement that should be assigned to the prev pointer |
String bridges.base.CircDLelement< E >.getDataStructType | ( | ) |
This method gets the name of the data structure type
Reimplemented from bridges.base.DLelement< E >.
CircDLelement<E> bridges.base.CircDLelement< E >.getNext | ( | ) |
This method returns the pointer to the next DLelement
Reimplemented from bridges.base.DLelement< E >.
CircDLelement<E> bridges.base.CircDLelement< E >.getPrev | ( | ) |
This method returns the pointer to the previous DLelement
Reimplemented from bridges.base.DLelement< E >.
Iterator<E> bridges.base.CircDLelement< E >.iterator | ( | ) |
Return an iterator over the elements in the array. This is generally not called directly, but is called by Java when used in a "simple" for loops
Reimplemented from bridges.base.SLelement< E >.
Iterator<E> bridges.base.CircDLelement< E >.reverse_iterator | ( | ) |
Return an iterator over the elements in the array. This is generally not called directly, but is called by Java when used in a "simple" for loops
Reimplemented from bridges.base.DLelement< E >.