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

This class can be used to instantiate Multi-list Elements. More...

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

Public Member Functions

 MLelement ()
 
 MLelement (String label, E e)
 
 MLelement (E e, MLelement< E > next)
 
 MLelement (MLelement< E > sublist, MLelement< E > next)
 
void setSubList (MLelement< E > sl)
 
MLelement getSubList ()
 
String getDataStructType ()
 
MLelement< E > getNext ()
 
void setTag (boolean t)
 
boolean getTag ()
 
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 Member Functions

void getListElements (Vector< Element< E >> nodes)
 
- 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)
 

Protected Attributes

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

Detailed Description

This class can be used to instantiate Multi-list Elements.

This class extends SLelement (singly linked list element) to build multi-lists; Multilist elements contain a tag that indicates if the element is a sublist or not; If the element points to a sublist, then the sublist field is the beginning of this sublist. If not, the data field contains the user specified data item and list continues (getNext()/setNext()). As in singly linked elements, the next pointer points to the following list element of the list or sublist.

Multi-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, for instance, between the current element and its next element. In this case, the link in question is that which connects the element to the following elements; a similar logic follows for sublists.

Author
, Kalpathi Subramanian
Date
5/24/17
Parameters
<E>The generic parameter object that is part of this element, representing either application specific data, or a pointer to a sublist.
See also
Example Tutorial at
??

Constructor & Destructor Documentation

This constructor creates an SLelement object and sets the next pointer to null

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

This constructor creates an SLelement object of generic parameter object E, and label "label" and sets the next pointer to null

Parameters
labelthe label of SLelement that shows up on the Bridges visualization
ethe generic object that this SLelement will hold
bridges.base.MLelement< E >.MLelement ( e,
MLelement< E >  next 
)

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

Parameters
ethe generic object that this element will hold
nextthe element that should be assigned to the next pointer
bridges.base.MLelement< E >.MLelement ( MLelement< E >  sublist,
MLelement< E >  next 
)

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

Parameters
nextthe SLelement that should be assigned to the next pointer

Member Function Documentation

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

This method gets the data structure type

Returns
The date structure type as a string
String bridges.base.MLelement< E >.getDataStructureRepresentation ( )
void bridges.base.MLelement< E >.getListElements ( Vector< Element< E >>  nodes)
protected
MLelement<E> bridges.base.MLelement< E >.getNext ( )

Retrieves the element following this element

Returns
MLelement<E> assigned to next
MLelement bridges.base.MLelement< E >.getSubList ( )

Gets the sublist at this node, if it exists

Returns
the sublist head element, if it exists
boolean bridges.base.MLelement< E >.getTag ( )

Gets the tag of the element.

Returns
tag of the element
void bridges.base.MLelement< E >.setSubList ( MLelement< E >  sl)

Sets the start of a new sublist. to the SLelement "next"

Parameters
slthe MLelement that is the beginning of a sublist
void bridges.base.MLelement< E >.setTag ( boolean  t)

Sets the tag of the element.

Parameters
booleant

Member Data Documentation

MLelement<E> bridges.base.MLelement< E >.sub_list = null
protected

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