Class MTreeDirectoryEntry

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double coveringRadius
      The covering radius of the entry.
      private int id
      Holds the id of the object (node or data object) represented by this entry.
      private double parentDistance
      The distance from the routing object of this entry to its parent's routing object.
      private DBID routingObjectID
      The id of routing object of this entry.
      private static long serialVersionUID
      Serialization version.
    • Constructor Summary

      Constructors 
      Constructor Description
      MTreeDirectoryEntry()
      Empty constructor for serialization purposes.
      MTreeDirectoryEntry​(DBID objectID, double parentDistance, int nodeID, double coveringRadius)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      double getCoveringRadius()
      Returns the covering radius of this entry.
      int getPageID()
      Get the page ID of this directory entry.
      double getParentDistance()
      Returns the distance from the routing object of this entry to its parent's routing object.
      DBID getRoutingObjectID()
      Returns the id of the routing object of this entry.
      int hashCode()  
      void readExternal​(java.io.ObjectInput in)
      Calls the super method and reads the routingObjectID, the parentDistance and the coveringRadius of this entry from the specified input stream.
      boolean setCoveringRadius​(double coveringRadius)
      Sets the covering radius of this entry.
      boolean setParentDistance​(double parentDistance)
      Sets the distance from the object to its parent object.
      boolean setRoutingObjectID​(DBID objectID)
      Sets the id of the routing object of this entry.
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)
      Calls the super method and writes the routingObjectID, the parentDistance and the coveringRadius of this entry to the specified stream.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serialization version.
        See Also:
        Constant Field Values
      • id

        private int id
        Holds the id of the object (node or data object) represented by this entry.
      • routingObjectID

        private DBID routingObjectID
        The id of routing object of this entry.
      • parentDistance

        private double parentDistance
        The distance from the routing object of this entry to its parent's routing object.
      • coveringRadius

        private double coveringRadius
        The covering radius of the entry.
    • Constructor Detail

      • MTreeDirectoryEntry

        public MTreeDirectoryEntry()
        Empty constructor for serialization purposes.
      • MTreeDirectoryEntry

        public MTreeDirectoryEntry​(DBID objectID,
                                   double parentDistance,
                                   int nodeID,
                                   double coveringRadius)
        Constructor.
        Parameters:
        objectID - the id of the routing object
        parentDistance - the distance from the routing object of this entry to its parent's routing object
        nodeID - the id of the underlying node
        coveringRadius - the covering radius of the entry
    • Method Detail

      • getCoveringRadius

        public final double getCoveringRadius()
        Returns the covering radius of this entry.
        Specified by:
        getCoveringRadius in interface MTreeEntry
        Returns:
        the covering radius of this entry
      • setCoveringRadius

        public final boolean setCoveringRadius​(double coveringRadius)
        Sets the covering radius of this entry.
        Specified by:
        setCoveringRadius in interface MTreeEntry
        Parameters:
        coveringRadius - the covering radius to be set
        Returns:
        TODO
      • getRoutingObjectID

        public final DBID getRoutingObjectID()
        Returns the id of the routing object of this entry.
        Specified by:
        getRoutingObjectID in interface MTreeEntry
        Returns:
        the id of the routing object
      • setRoutingObjectID

        public final boolean setRoutingObjectID​(DBID objectID)
        Sets the id of the routing object of this entry.
        Specified by:
        setRoutingObjectID in interface MTreeEntry
        Parameters:
        objectID - the id to be set
        Returns:
        TODO
      • getParentDistance

        public final double getParentDistance()
        Returns the distance from the routing object of this entry to its parent's routing object.
        Specified by:
        getParentDistance in interface MTreeEntry
        Returns:
        the distance from the routing object of this entry to its parent's routing object.
      • setParentDistance

        public final boolean setParentDistance​(double parentDistance)
        Sets the distance from the object to its parent object.
        Specified by:
        setParentDistance in interface MTreeEntry
        Parameters:
        parentDistance - the distance to be set
        Returns:
        TODO
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Calls the super method and writes the routingObjectID, the parentDistance and the coveringRadius of this entry to the specified stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Calls the super method and reads the routingObjectID, the parentDistance and the coveringRadius of this entry from the specified input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object