Class Debug

java.lang.Object
org.locationtech.jts.util.Debug

public class Debug extends Object
Provides routines to simplify and localize debugging output. Debugging is controlled via a Java system property value. If the system property with the name given in DEBUG_PROPERTY_NAME (currently "jts.debug") has the value "on" or "true" debugging is enabled. Otherwise, debugging is disabled. The system property can be set by specifying the following JVM option:
 -Djts.debug=on
 
Version:
1.7
  • Field Details

    • DEBUG_PROPERTY_NAME

      public static String DEBUG_PROPERTY_NAME
    • DEBUG_PROPERTY_VALUE_ON

      public static String DEBUG_PROPERTY_VALUE_ON
    • DEBUG_PROPERTY_VALUE_TRUE

      public static String DEBUG_PROPERTY_VALUE_TRUE
    • debugOn

      private static boolean debugOn
    • stopwatch

      private static Stopwatch stopwatch
    • lastTimePrinted

      private static long lastTimePrinted
    • debug

      private static final Debug debug
    • fact

      private static final GeometryFactory fact
    • DEBUG_LINE_TAG

      private static final String DEBUG_LINE_TAG
      See Also:
    • out

      private PrintStream out
    • printArgs

      private Class[] printArgs
    • watchObj

      private Object watchObj
    • args

      private Object[] args
  • Constructor Details

    • Debug

      private Debug()
  • Method Details

    • main

      public static void main(String[] args)
      Prints the status of debugging to System.out
      Parameters:
      args - the cmd-line arguments (no arguments are required)
    • isDebugging

      public static boolean isDebugging()
    • toLine

      public static LineString toLine(Coordinate p0, Coordinate p1)
    • toLine

      public static LineString toLine(Coordinate p0, Coordinate p1, Coordinate p2)
    • toLine

      public static LineString toLine(Coordinate p0, Coordinate p1, Coordinate p2, Coordinate p3)
    • print

      public static void print(String str)
    • print

      public static void print(Object obj)
    • print

      public static void print(boolean isTrue, Object obj)
    • println

      public static void println(Object obj)
    • resetTime

      public static void resetTime()
    • printTime

      public static void printTime(String tag)
    • formatField

      private static String formatField(String s, int fieldLen)
    • spaces

      private static String spaces(int n)
    • equals

      public static boolean equals(Coordinate c1, Coordinate c2, double tolerance)
    • addWatch

      public static void addWatch(Object obj)
      Adds an object to be watched. A watched object can be printed out at any time. Currently only supports one watched object at a time.
      Parameters:
      obj -
    • printWatch

      public static void printWatch()
    • printIfWatch

      public static void printIfWatch(Object obj)
    • breakIf

      public static void breakIf(boolean cond)
    • breakIfEqual

      public static void breakIfEqual(Object o1, Object o2)
    • breakIfEqual

      public static void breakIfEqual(Coordinate p0, Coordinate p1, double tolerance)
    • doBreak

      private static void doBreak()
    • hasSegment

      public static boolean hasSegment(Geometry geom, Coordinate p0, Coordinate p1)
    • instancePrintWatch

      public void instancePrintWatch()
    • instancePrintIfWatch

      public void instancePrintIfWatch(Object obj)
    • instancePrint

      public void instancePrint(Object obj)
    • instancePrint

      public void instancePrint(Iterator it)
    • instancePrintObject

      public void instancePrintObject(Object obj)
    • println

      public void println()
    • instanceAddWatch

      private void instanceAddWatch(Object obj)
    • instancePrint

      private void instancePrint(String str)