Class SpatialDirectoryEntry

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int id
      Holds the id of the object (node or data object) represented by this entry.
      private ModifiableHyperBoundingBox mbr
      The minimum bounding rectangle of the underlying spatial node.
      private static long serialVersionUID
      Serialization version.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      boolean extendMBR​(SpatialComparable responsibleMBR)
      Extend the MBR of this node.
      int getDimensionality()
      Returns the dimensionality of the object.
      double getMax​(int dimension)
      Returns the maximum coordinate at the specified dimension.
      double getMin​(int dimension)
      Returns the minimum coordinate at the specified dimension.
      int getPageID()
      Get the page ID of this directory entry.
      int hashCode()  
      boolean hasMBR()
      Test whether this entry already has an MBR.
      void readExternal​(java.io.ObjectInput in)
      Calls the super method and reads the MBR object of this entry from the specified input stream.
      void setMBR​(ModifiableHyperBoundingBox mbr)
      Sets the MBR of this entry.
      java.lang.String toString()  
      void writeExternal​(java.io.ObjectOutput out)
      Calls the super method and writes the MBR object of this entry to the specified output 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.
    • Constructor Detail

      • SpatialDirectoryEntry

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

        public SpatialDirectoryEntry​(int id,
                                     ModifiableHyperBoundingBox mbr)
        Constructs a new SpatialDirectoryEntry object with the given parameters.
        Parameters:
        id - the unique id of the underlying spatial node
        mbr - the minimum bounding rectangle of the underlying spatial node
    • Method Detail

      • getMin

        public double getMin​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the minimum coordinate at the specified dimension.
        Specified by:
        getMin in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the coordinate at the specified dimension of the minimum hyper point of the MBR of the underlying node
      • getMax

        public double getMax​(int dimension)
        Description copied from interface: SpatialComparable
        Returns the maximum coordinate at the specified dimension.
        Specified by:
        getMax in interface SpatialComparable
        Parameters:
        dimension - the dimension for which the coordinate should be returned, where 0 ≤ dimension < getDimensionality()
        Returns:
        the coordinate at the specified dimension of the maximum hyper point of the MBR of the underlying node
      • hasMBR

        public boolean hasMBR()
        Test whether this entry already has an MBR.
        Returns:
        True when an MBR exists.
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Calls the super method and writes the MBR object of this entry to the specified output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - the stream to write the object to
        Throws:
        java.io.IOException - Includes any I/O exceptions that may occur
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Calls the super method and reads the MBR object of this entry from the specified input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - the stream to read data from in order to restore the object
        Throws:
        java.io.IOException - if I/O errors occur
        java.lang.ClassNotFoundException - If the class for an object being restored cannot be found.
      • extendMBR

        public boolean extendMBR​(SpatialComparable responsibleMBR)
        Extend the MBR of this node.
        Parameters:
        responsibleMBR -
        Returns:
        true when the MBR changed
      • 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