This is the main superclass in BRIDGES for deriving a number of objects used in building arrays, lists, trees and graph data structures.
More...
This is the main superclass in BRIDGES for deriving a number of objects used in building arrays, lists, trees and graph data structures.
DLelement, CircSLelement, CircDLelement, TreeElement, BinTreeElement, BSTElement, AVLTreeElement are all subclasses. Element contains visualizer objects (ElementVisualizer, LinkVisualizer) for specifying visual attributes. It also contains a label that is used in the visualization.
- Author
- Mihai Mehedint, Kalpathi Subramanian
- Parameters
-
the constructor of Element
- Parameters
-
val | will be used to construct Element |
the constructor of Element
- Parameters
-
label | the string that is visible on the Bridges Visualization |
val | will be used to construct Element |
performing deep copy of an element when needed
- Parameters
-
original | the Element that is to be copied |
This method formats the label string using a predefine pattern (DIVIDE_KEY) and replaces the pattern with the string characters hold by the INSERT_STRING global variable
- Parameters
-
label | |
wordNumber | in very long strings in the case where the whitespace \s is chosen as a key the wordNumber can be set to replace the whitespace with a newline character \n at a given number of words (every second or third word) The default value is 0. In most situations we want to replace all patterns found. for more complex patterns the key must be changed like so "((John) (.+?))" returns "John firstWordAfterJohn": John writes, John doe, John eats etc. (\w) matches any word (\s) one white space (\s*) zero or more white spaces, (\s+) one or more |
- Returns
Comparison between 2 elements
- Parameters
-
- Returns
- 0 if the 2 elements have the same label and the same identifier and a nonZero integer otherwise
This method compares 2 Elements
- Parameters
-
- Returns
- boolean
This method returns the name of the class
- Returns
- the class name "Element"
this method returns the element's unique identifier
- Returns
- the string identifier
This method returns the existing value of the label fields
- Returns
- the label of the Element that shows up on the Bridges Visualization
Returns the Element's link visualizer object that is linked to element el Element el – the element terminating the link
- Returns
- the link visualizer
Internal code for getting the properties of the Element object. It produces (without the spaces or newlines): { "name": "Some label", "other CSS properties like color": any_JSON_value }
- Returns
- the encoded JSON string
this method returns the value E for the current Element
- Returns
- the value
Returns the Element's visualizer object
- Returns
- the visualizer
This method sets the label
- Parameters
-
This method sets the value field to the E argument value
- Parameters
-
This method sets the visualizer object for the current element object
- Parameters
-
visualizer | the visualizer to set |
Validates the Element's value when the Element is created A non null value is expected this will be unnecessary after we modify the server
- Parameters
-
The documentation for this class was generated from the following file: