diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-11-23 17:19:18 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-11-23 17:22:43 +0100 |
| commit | 5ba497ef1487c76f4673fd9a7f3c62512b8cef6f (patch) | |
| tree | bd12d4ad36075b5d47747063c84e0937143811b4 /main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java | |
| parent | 121d4285d747ce2ec707ad3cb7a9166833699fb6 (diff) | |
| download | cgeo-5ba497ef1487c76f4673fd9a7f3c62512b8cef6f.zip cgeo-5ba497ef1487c76f4673fd9a7f3c62512b8cef6f.tar.gz cgeo-5ba497ef1487c76f4673fd9a7f3c62512b8cef6f.tar.bz2 | |
reduce visibility
All changes done with UCDetector. This can help in seeing which packages
are not yet self contained (e.g. all the remaining public constants in
GCConstants).
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java')
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java index f9b8e1c..9de7e1e 100644 --- a/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java +++ b/main/src/cgeo/geocaching/connector/gc/UTFGridPosition.java @@ -8,13 +8,13 @@ import java.util.regex.Pattern; /** * Representation of a position inside an UTFGrid */ -public final class UTFGridPosition { +final class UTFGridPosition { - public final int x; - public final int y; + final int x; + final int y; private final static Pattern PATTERN_JSON_KEY = Pattern.compile("[^\\d]*" + "(\\d+),\\s*(\\d+)" + "[^\\d]*"); // (12, 34) - public UTFGridPosition(final int x, final int y) { + UTFGridPosition(final int x, final int y) { if (x < 0 || x > UTFGrid.GRID_MAXX) { throw new IllegalArgumentException("x outside bounds"); } @@ -38,7 +38,7 @@ public final class UTFGridPosition { * Key in the format (xx, xx) * @return */ - static UTFGridPosition fromString(String key) { + static UTFGridPosition fromString(final String key) { final MatcherWrapper matcher = new MatcherWrapper(UTFGridPosition.PATTERN_JSON_KEY, key); try { if (matcher.matches()) { @@ -46,7 +46,7 @@ public final class UTFGridPosition { final int y = Integer.parseInt(matcher.group(2)); return new UTFGridPosition(x, y); } - } catch (NumberFormatException ignored) { + } catch (final NumberFormatException ignored) { } return new UTFGridPosition(0, 0); } |
