Class Depth


  • public class Depth
    extends java.lang.Object
    A Depth object records the topological depth of the sides of an Edge for up to two Geometries.
    Version:
    1.7
    • Constructor Summary

      Constructors 
      Constructor Description
      Depth()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int geomIndex, int posIndex, int location)  
      void add​(Label lbl)  
      static int depthAtLocation​(int location)  
      int getDelta​(int geomIndex)  
      int getDepth​(int geomIndex, int posIndex)  
      int getLocation​(int geomIndex, int posIndex)  
      boolean isNull()
      A Depth object is null (has never been initialized) if all depths are null.
      boolean isNull​(int geomIndex)  
      boolean isNull​(int geomIndex, int posIndex)  
      void normalize()
      Normalize the depths for each geometry, if they are non-null.
      void setDepth​(int geomIndex, int posIndex, int depthValue)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Depth

        public Depth()
    • Method Detail

      • depthAtLocation

        public static int depthAtLocation​(int location)
      • getDepth

        public int getDepth​(int geomIndex,
                            int posIndex)
      • setDepth

        public void setDepth​(int geomIndex,
                             int posIndex,
                             int depthValue)
      • getLocation

        public int getLocation​(int geomIndex,
                               int posIndex)
      • add

        public void add​(int geomIndex,
                        int posIndex,
                        int location)
      • isNull

        public boolean isNull()
        A Depth object is null (has never been initialized) if all depths are null.
        Returns:
        True if depth is null (has never been initialized)
      • isNull

        public boolean isNull​(int geomIndex)
      • isNull

        public boolean isNull​(int geomIndex,
                              int posIndex)
      • add

        public void add​(Label lbl)
      • getDelta

        public int getDelta​(int geomIndex)
      • normalize

        public void normalize()
        Normalize the depths for each geometry, if they are non-null. A normalized depth has depth values in the set { 0, 1 }. Normalizing the depths involves reducing the depths by the same amount so that at least one of them is 0. If the remaining value is > 0, it is set to 1.
      • toString

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