For IntelliJ IDEA,

Android Studio or Eclipse

public static boolean containsProperly(Geometry g1, Geometry g2) { PreparedGeometry prepGeom = PreparedGeometryFactory.prepare(g1); return prepGeom.containsProperly(g2); } public static boolean covers(Geometry g1, Geometry g2)

private void checkContainsProperly(PreparedGeometry pg, Geometry g2) { boolean pgResult = pg.containsProperly(g2); boolean expected = containsProperly(pg.getGeometry(), g2); if (pgResult != expected) throw new IllegalStateException("PreparedGeometry.containsProperly result does not match expected"); // System.out.println("Results match!"); }

public static boolean preparedContainsProperly(Geometry g1, Geometry g2) { return createPG(g1).containsProperly(g2); }