Bridges-Java-2.3.3  2.3.3
Bridges(JavaAPI)
Public Member Functions | Protected Attributes | List of all members
bridges.base.DLelement< E > Class Template Reference

This class is used to create doubly linked element objects. More...

Inheritance diagram for bridges.base.DLelement< E >:
bridges.base.SLelement< E > bridges.base.Element< E > bridges.base.DataStruct bridges.base.CircDLelement< E >

Public Member Functions

 DLelement ()
 
 DLelement (String label, E e)
 
 DLelement (DLelement< E > next, DLelement< E > prev)
 
 DLelement (E e, DLelement< E > next, DLelement< E > prev)
 
String getDataStructType ()
 
DLelement< E > getNext ()
 
DLelement< E > getPrev ()
 
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)
 
String getDataStructType ()
 
SLelement< E > getNext ()
 
void setNext (SLelement< E > next)
 
String toString ()
 
String getDataStructureRepresentation ()
 
- Public Member Functions inherited from bridges.base.Element< E >
String getDataStructType ()
 
 Element ()
 
 Element (E val)
 
 Element (String label, E val)
 
 Element (Element< E > original)
 
String getIdentifier ()
 
ElementVisualizer getVisualizer ()
 
void setVisualizer (ElementVisualizer visualizer)
 
LinkVisualizer getLinkVisualizer (Element< E > el)
 
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)
 
String arrangeLabel (String label, int wordNumber)
 
getValue ()
 
void setValue (E value)
 
String toString ()
 
- Public Member Functions inherited from bridges.base.DataStruct
abstract String getDataStructType ()
 

Protected Attributes

DLelement< E > prev
 
- Protected Attributes inherited from bridges.base.SLelement< E >
SLelement< E > next = null
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

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)
 
void removeLinkVisualizer (Element< E > el)
 
void validateVal (E value)
 

Detailed Description

This class is used to create doubly linked element objects.

Author
Mihai Mehedint, Kalpathi Subramanian
Date
6/22/16, 1/7/17, 5/17/17

This class extends Element and takes a generic parameter <E> representing application specific data. This element forms the basic building block for doubly linked lists. Doubly linked elements have two links, "next" and "previous", that point to the previous and succeeding nodes along the list.

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, such as in linked lists, between the current element and its next or previous nodes.

Parameters
<E>The generic parameter object that is part of this element, representing application specific data.
See also
Example Tutorial at
http://bridgesuncc.github.io/Hello_World_Tutorials/DLL.html

Constructor & Destructor Documentation

Constructs an empty DLelement with next and prev pointers set to null.

bridges.base.DLelement< E >.DLelement ( String  label,
e 
)

Constructs a DLelement labeled "label", holding an object "e", with next and prev pointers set to null.

Parameters
labelthe label for this DLelement that shows up on the Bridges visualization
ethe genereic object that is held in this element.
bridges.base.DLelement< E >.DLelement ( DLelement< E >  next,
DLelement< E >  prev 
)

Constructs an empty DLelement with the next pointer set to the DLelement "next" and the prev pointer set to DLelement "prev".

Parameters
nextthe DLelement that should be assigned to the next pointer
prevthe DLelement that should be assigned to the prev pointer
bridges.base.DLelement< E >.DLelement ( e,
DLelement< E >  next,
DLelement< 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".

Parameters
ethe genereic object that this DLelement is holding
nextthe DLelement that should be assigned to the next pointer
prevthe DLelement that should be assigned to the prev pointer

Member Function Documentation

String bridges.base.DLelement< E >.getDataStructType ( )

This method gets the data structure type

Returns
The date structure type as a string
String bridges.base.DLelement< E >.getDataStructureRepresentation ( )
DLelement<E> bridges.base.DLelement< E >.getNext ( )

This method returns the pointer to the next DLelement

Returns
the DLelement assigned to the next pointer
DLelement<E> bridges.base.DLelement< E >.getPrev ( )

This method sets the pointer to the next DLelement

Parameters
nextthe DLelement that should be assigned to the next pointer This method returns the pointer to the previous DLelement
Returns
the DLelement assigned to the prev pointer
void bridges.base.DLelement< E >.setPrev ( DLelement< E >  prv)

This method sets the pointer to the previous DLelement

Parameters
prevthe DLelement that should be assigned to the prev pointer

Member Data Documentation

DLelement<E> bridges.base.DLelement< E >.prev
protected

The documentation for this class was generated from the following file: