SmosDgg { public static int seqnumToSeqnumInZone(int seqnum) { return seqnum <= C ? seqnum : seqnum == MAX_SEQNUM ? C : (seqnum - 2) % B + 1; } private  SmosDgg(); static SmosDgg getInstance(); static int gridPointIdToSeqnum(int gridPointId); static int seqnumToSeqnumInZone(int seqnum); static int seqnumToZoneId(int seqnum); AffineTransform getImageToMapTransform(); MultiLevelImage getMultiLevelImage(); static final int MIN_GRID_POINT_ID; static final int MAX_GRID_POINT_ID; static final int MAX_SEQNUM; static final int MAX_ZONE_ID; }
@Test public void seqnumToSeqnumInZone() { assertEquals(1, SmosDgg.seqnumToSeqnumInZone(1)); assertEquals(2, SmosDgg.seqnumToSeqnumInZone(2)); assertEquals(3, SmosDgg.seqnumToSeqnumInZone(3)); assertEquals(262144, SmosDgg.seqnumToSeqnumInZone(262144)); assertEquals(262145, SmosDgg.seqnumToSeqnumInZone(262145)); assertEquals(1, SmosDgg.seqnumToSeqnumInZone(262146)); assertEquals(2, SmosDgg.seqnumToSeqnumInZone(262147)); assertEquals(262143, SmosDgg.seqnumToSeqnumInZone(524288)); assertEquals(262144, SmosDgg.seqnumToSeqnumInZone(524289)); assertEquals(1, SmosDgg.seqnumToSeqnumInZone(524290)); assertEquals(2, SmosDgg.seqnumToSeqnumInZone(524291)); assertEquals(262143, SmosDgg.seqnumToSeqnumInZone(2359296)); assertEquals(262144, SmosDgg.seqnumToSeqnumInZone(2359297)); assertEquals(1, SmosDgg.seqnumToSeqnumInZone(2359298)); assertEquals(2, SmosDgg.seqnumToSeqnumInZone(2359299)); assertEquals(262144, SmosDgg.seqnumToSeqnumInZone(2621441)); assertEquals(262145, SmosDgg.seqnumToSeqnumInZone(2621442)); }