Class BinaryHeap.Node

java.lang.Object
com.github.tommyettinger.ds.BinaryHeap.Node
Enclosing class:
BinaryHeap<T extends BinaryHeap.Node>

public static class BinaryHeap.Node extends Object
A binary heap node. Has a float value that is used to compare this Node with others, and an int index that is used inside BinaryHeap. This class is often extended so requisite functionality can be supplied and sorted by BinaryHeap.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Used internally by BinaryHeap; generally not modified by external code, but may need to be read.
    float
    The value that is used to compare this Node with others.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Node(float value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • value

      public float value
      The value that is used to compare this Node with others.
    • index

      public int index
      Used internally by BinaryHeap; generally not modified by external code, but may need to be read.
  • Constructor Details

  • Method Details

    • getValue

      public float getValue()
    • toString

      public String toString()
      Overrides:
      toString in class Object