@Test public void testToString() throws IOException { OSHNode node100 = buildHOSMNode( Arrays.asList(new OSMNode(100l, 1, new OSHDBTimestamp(1l), 0l, 123, new int[]{1, 2}, 494094984l, 86809727l))); OSHNode node102 = buildHOSMNode( Arrays.asList(new OSMNode(102l, 1, new OSHDBTimestamp(1l), 0l, 123, new int[]{2, 1}, 494094984l, 86809727l))); OSHNode node104 = buildHOSMNode( Arrays.asList(new OSMNode(104l, 1, new OSHDBTimestamp(1l), 0l, 123, new int[]{2, 4}, 494094984l, 86809727l))); OSHWay way200 = buildHOSMWay(Arrays.asList(new OSMWay(200, 1, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{1, 2}, new OSMMember[]{new OSMMember(100, OSMType.NODE, 0), new OSMMember(104, OSMType.NODE, 0)})), Arrays.asList(node100, node104)); OSHWay way202 = buildHOSMWay(Arrays.asList(new OSMWay(202, 1, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{1, 2}, new OSMMember[]{new OSMMember(100, OSMType.NODE, 0), new OSMMember(102, OSMType.NODE, 0)})), Arrays.asList(node100, node102)); OSHRelation relation300 = OSHRelationImpl.build(Arrays.asList( new OSMRelation(300, 1, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{}, new OSMMember[]{new OSMMember(100, OSMType.NODE, 0, null), new OSMMember(102, OSMType.NODE, 0, null)}), new OSMRelation(300, 2, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{1, 2}, new OSMMember[]{new OSMMember(100, OSMType.NODE, 0, null), new OSMMember(102, OSMType.NODE, 0, null)})), Arrays.asList(node100, node102), Arrays.asList()); OSHRelation relation301 = OSHRelationImpl.build(Arrays.asList( new OSMRelation(301, 1, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{}, new OSMMember[]{new OSMMember(200, OSMType.WAY, 1, null), new OSMMember(202, OSMType.WAY, 1, null)}), new OSMRelation(301, 2, new OSHDBTimestamp(3333l), 4444l, 23, new int[]{1, 2}, new OSMMember[]{new OSMMember(200, OSMType.WAY, 1, null), new OSMMember(202, OSMType.WAY, 1, null)})), Arrays.asList(), Arrays.asList(way200, way202)); long cellId = 2; int cellLevel = 2; long baseId = 1234; GridOSHRelations instance = GridOSHRelations.compact(cellId, cellLevel, baseId, 0, 0, 0, Arrays.asList(relation300, relation301)); String expResult = "Grid-Cell of OSHRelations ID:2 Level:2 BBox:(-90.000000,0.000000),(-0.000000,90.000000)"; String result = instance.toString(); assertEquals(expResult, result); }
@Override public String toString() { return String.format("Grid-Cell of OSHRelations %s", super.toString()); }
GridOSHRelations extends GridOSHEntity implements Iterable<OSHRelation> { @Override public String toString() { return String.format("Grid-Cell of OSHRelations %s", super.toString()); } }
GridOSHRelations extends GridOSHEntity implements Iterable<OSHRelation> { @Override public String toString() { return String.format("Grid-Cell of OSHRelations %s", super.toString()); } private  GridOSHRelations(final long id, final int level, final long baseId, final long baseTimestamp,
          final long baseLongitude, final long baseLatitude, final int[] index, final byte[] data); }
GridOSHRelations extends GridOSHEntity implements Iterable<OSHRelation> { @Override public String toString() { return String.format("Grid-Cell of OSHRelations %s", super.toString()); } private  GridOSHRelations(final long id, final int level, final long baseId, final long baseTimestamp,
          final long baseLongitude, final long baseLatitude, final int[] index, final byte[] data); static GridOSHRelations compact(final long id, final int level, final long baseId,
          final long baseTimestamp, final long baseLongitude, final long baseLatitude,
          final List<OSHRelation> list); @Override Iterable<? extends OSHEntity> getEntities(); @Override Iterator<OSHRelation> iterator(); @Override String toString(); }
GridOSHRelations extends GridOSHEntity implements Iterable<OSHRelation> { @Override public String toString() { return String.format("Grid-Cell of OSHRelations %s", super.toString()); } private  GridOSHRelations(final long id, final int level, final long baseId, final long baseTimestamp,
          final long baseLongitude, final long baseLatitude, final int[] index, final byte[] data); static GridOSHRelations compact(final long id, final int level, final long baseId,
          final long baseTimestamp, final long baseLongitude, final long baseLatitude,
          final List<OSHRelation> list); @Override Iterable<? extends OSHEntity> getEntities(); @Override Iterator<OSHRelation> iterator(); @Override String toString();  }