Back to index

wims  3.65+svn20090927
Public Member Functions | Private Attributes
fr.ove.utils.LinkedElement Class Reference

A element of linked structure (queue, lists, etc. More...

Inheritance diagram for fr.ove.utils.LinkedElement:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.utils.LinkedElement:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LinkedElement ()
 The default contstructor.
 LinkedElement (Object element)
 The contstructor.
void setElement (Object element)
 Sets the element.
Object getElement ()
 Returns the element.
void setPrevious (LinkedElement previous)
 Sets the previous element of the instance.
LinkedElement getPrevious ()
 Returns the previous element of the instance.
void setNext (LinkedElement next)
 Sets the next element of the instance.
LinkedElement getNext ()
 Returns the next element of the instance.
void remove ()
 Removes the instance from the structure.
String toString ()
 Returns a string representation of the element.

Private Attributes

Object element
 The element in the structure.
LinkedElement previous
 The previous element in the structure.
LinkedElement next
 The next element in the structure.

Detailed Description

A element of linked structure (queue, lists, etc.

Contains the element added in the structure and the reference to the previous and the next element in the structure.

Author:
2000 DIRAT Laurent
Version:
1.0 28/06/2000

Definition at line 19 of file LinkedElement.java.


Constructor & Destructor Documentation

The default contstructor.

Definition at line 38 of file LinkedElement.java.

                           {
        this(null);
    }
fr.ove.utils.LinkedElement.LinkedElement ( Object  element) [inline]

The contstructor.

Parameters:
elementthe element in the structure

Definition at line 46 of file LinkedElement.java.

                                         {
        this.element = element;
        previous = null;
        next = null;
    }

Member Function Documentation

Returns the element.

Definition at line 62 of file LinkedElement.java.

                               {
        return element;
    }

Here is the caller graph for this function:

Returns the next element of the instance.

Definition at line 90 of file LinkedElement.java.

                                   {
        return next;
    }

Here is the caller graph for this function:

Returns the previous element of the instance.

Definition at line 76 of file LinkedElement.java.

                                       {
        return previous;
    }

Here is the caller graph for this function:

Removes the instance from the structure.

Definition at line 97 of file LinkedElement.java.

                         {
        element = null;
        
        if (previous != null)
            previous.next = next;
            
        if (next != null)
            next.previous = previous;
    }

Here is the caller graph for this function:

void fr.ove.utils.LinkedElement.setElement ( Object  element) [inline]

Sets the element.

Definition at line 55 of file LinkedElement.java.

                                           {
        this.element = element;
    }

Sets the next element of the instance.

Definition at line 83 of file LinkedElement.java.

                                            {
        this.next = next;
    }

Here is the caller graph for this function:

Sets the previous element of the instance.

Definition at line 69 of file LinkedElement.java.

                                                    {
        this.previous = previous;
    }

Here is the caller graph for this function:

Returns a string representation of the element.

Definition at line 110 of file LinkedElement.java.

                             {
        return element.toString();
    }

Here is the caller graph for this function:


Member Data Documentation

The element in the structure.

Definition at line 23 of file LinkedElement.java.

The next element in the structure.

Definition at line 33 of file LinkedElement.java.

The previous element in the structure.

Definition at line 28 of file LinkedElement.java.


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