Bridges-Java-3.0.2  3.0.2
Bridges(JavaAPI)
Public Member Functions | List of all members
bridges.base.CircSLelement< E > Class Template Reference
Inheritance diagram for bridges.base.CircSLelement< E >:
bridges.base.SLelement< E > bridges.base.Element< E > bridges.base.DataStruct

Detailed Description

This class can be used to instantiate Singly Linked Circular List Elements.

Structurally they are the same as singly linked elements except that each node constructed with the next point pointing to itself; User's implementation of the circularly linked list needs to ensure that the last node points to first node of the list, as the visualization generation is dependent on this.

Elements have labels (string) that are displayed on the visualization. Elements take an generic object as a user defined parameter, E, which can be any native type or object.

Elements contains 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 an element and its next element.

\sa Example Tutorial at http://bridgesuncc.github.io/tutorials/CircularSinglyLinkedList.html

Author
Kalpathi Subramanian
Date
6/22/16, 1/7/17, 5/17/17, 7/14/19
Parameters
<E>the generic parameter that is defined by the application

Public Member Functions

 CircSLelement ()
 
 CircSLelement (String label, E e)
 
 CircSLelement (E e, CircSLelement< E > next)
 
 CircSLelement (CircSLelement< E > next)
 
String getDataStructType ()
 
CircSLelement< E > getNext ()
 
String toString ()
 
- 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 ()
 
Iterator< SLelement< E > > iterator ()
 
- Public Member Functions inherited from bridges.base.Element< E >
String getDataStructType ()
 Get the Element type name. More...
 
 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 getDataStructureRepresentation ()
 
String getLinkRepresentation (LinkVisualizer lv, String src, String dest)
 
String getLabel ()
 
void setLabel (String label)
 
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 ()
 
String toString ()
 
- Public Member Functions inherited from bridges.base.DataStruct
abstract String getDataStructType ()
 
abstract String getDataStructureRepresentation ()
 

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.SLelement< E >
SLelement< E > next = null
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

Constructor & Destructor Documentation

◆ CircSLelement() [1/4]

This constructor creates an CircSLelement object and sets its next pointer to itself

◆ CircSLelement() [2/4]

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

This constructor creates an CircSLelement object of value "e" and label "label" and sets the next pointer to null

Parameters
labelthe label of CircSLelement that shows up on the Bridges visualization
ethe generic object that this CircSLelement will hold

◆ CircSLelement() [3/4]

Creates a new element with value "e" and sets the next pointer to the CircSLelement referenced by the "next" argument

Parameters
ethe generic object that this CircSLelement will hold
nextthe CircSLelement that should be assigned to the next pointer

◆ CircSLelement() [4/4]

Creates a new element and sets the next pointer to the CircSLelement "next"

Parameters
nextthe CircSLelement that should be assigned to the next pointer

Member Function Documentation

◆ getDataStructType()

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

This method gets the data structure type

Returns
The date structure type as a string

◆ getNext()

Retrieves the next CircSLelement

Returns
CircSLelement<E> assigned to next

◆ toString()

String bridges.base.CircSLelement< E >.toString ( )

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