openlr.map.utils
Class PQElem

java.lang.Object
  extended by openlr.map.utils.PQElem
All Implemented Interfaces:
LineLinkedListElement

public class PQElem
extends Object
implements LineLinkedListElement

The Class PQElem represents an entry of a priority queue. It implements the LineLinkedListElement interface and holds additionally to the line also data for ordering the elements in the priority queue. Each element has got two numerical values for such ordering and the compare method orders the elements lexicographically.

OpenLR is a trade mark of TomTom International B.V.

email: software@openlr.org

Author:
TomTom International B.V.

Nested Class Summary
static class PQElem.PQElemComparator
          The Class PQElemComparator.
 
Constructor Summary
PQElem(Line l, int f, int s, PQElem p)
          Instantiates a new Priority Queue element.
 
Method Summary
 boolean equals(Object o)
          
 int getFirstVal()
          Gets the first value.
 Line getLine()
          Gets the line.
 PQElem getPrevious()
          Gets the predecessor.
 int getSecondVal()
          Gets the second value.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PQElem

public PQElem(Line l,
              int f,
              int s,
              PQElem p)
Instantiates a new Priority Queue element.

Parameters:
l - the line
f - the first numerical value
s - the second numerical value
p - the parent
Method Detail

equals

public final boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public final int hashCode()

Overrides:
hashCode in class Object

getLine

public final Line getLine()
Gets the line.

Specified by:
getLine in interface LineLinkedListElement
Returns:
the line

getPrevious

public final PQElem getPrevious()
Gets the predecessor.

Specified by:
getPrevious in interface LineLinkedListElement
Returns:
the predecessor

getFirstVal

public final int getFirstVal()
Gets the first value.

Returns:
the first value

getSecondVal

public final int getSecondVal()
Gets the second value.

Returns:
the second value

toString

public final String toString()

Overrides:
toString in class Object


Copyright © 2013 TomTom International B.V.. All Rights Reserved.