Changeset 17765 in josm for trunk/src


Ignore:
Timestamp:
2021-04-13T13:26:03+02:00 (3 years ago)
Author:
simon04
Message:

see #20744 - Remove NO_UCD (unused code)

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java

    r17762 r17765  
    721721         * @return {@code true} if the way is closed or the relation is a closed multipolygon
    722722         */
    723         static boolean closed(Environment e) { // NO_UCD (unused code)
     723        static boolean closed(Environment e) {
    724724            if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed())
    725725                return true;
     
    733733         * @see IPrimitive#isModified()
    734734         */
    735         static boolean modified(Environment e) { // NO_UCD (unused code)
     735        static boolean modified(Environment e) {
    736736            return e.osm.isModified() || e.osm.isNewOrUndeleted();
    737737        }
     
    743743         * @see IPrimitive#isNew()
    744744         */
    745         static boolean _new(Environment e) { // NO_UCD (unused code)
     745        static boolean _new(Environment e) {
    746746            return e.osm.isNew();
    747747        }
     
    753753         * @see Node#isConnectionNode()
    754754         */
    755         static boolean connection(Environment e) { // NO_UCD (unused code)
     755        static boolean connection(Environment e) {
    756756            return e.osm instanceof INode && e.osm.getDataSet() != null && ((INode) e.osm).isConnectionNode();
    757757        }
     
    763763         * @see IPrimitive#isTagged()
    764764         */
    765         static boolean tagged(Environment e) { // NO_UCD (unused code)
     765        static boolean tagged(Environment e) {
    766766            return e.osm.isTagged();
    767767        }
     
    773773         * @see IPrimitive#hasSameInterestingTags(IPrimitive)
    774774         */
    775         static boolean sameTags(Environment e) { // NO_UCD (unused code)
     775        static boolean sameTags(Environment e) {
    776776            return e.osm.hasSameInterestingTags(Utils.firstNonNull(e.child, e.parent));
    777777        }
     
    783783         * @see ElemStyles#hasAreaElemStyle(IPrimitive, boolean)
    784784         */
    785         static boolean areaStyle(Environment e) { // NO_UCD (unused code)
     785        static boolean areaStyle(Environment e) {
    786786            // only for validator
    787787            return ElemStyles.hasAreaElemStyle(e.osm, false);
     
    793793         * @return {@code true} if the object is a unconnected node
    794794         */
    795         static boolean unconnected(Environment e) { // NO_UCD (unused code)
     795        static boolean unconnected(Environment e) {
    796796            return e.osm instanceof Node && ((Node) e.osm).getParentWays().isEmpty();
    797797        }
     
    803803         * @see Functions#is_right_hand_traffic(Environment)
    804804         */
    805         static boolean righthandtraffic(Environment e) { // NO_UCD (unused code)
     805        static boolean righthandtraffic(Environment e) {
    806806            return Functions.is_right_hand_traffic(e);
    807807        }
     
    814814         * @see Functions#is_clockwise(Environment)
    815815         */
    816         static boolean clockwise(Environment e) { // NO_UCD (unused code)
     816        static boolean clockwise(Environment e) {
    817817            return Functions.is_clockwise(e);
    818818        }
     
    825825         * @see Functions#is_anticlockwise(Environment)
    826826         */
    827         static boolean anticlockwise(Environment e) { // NO_UCD (unused code)
     827        static boolean anticlockwise(Environment e) {
    828828            return Functions.is_anticlockwise(e);
    829829        }
     
    834834         * @return {@code true} if the object is an unclosed multipolygon
    835835         */
    836         static boolean unclosed_multipolygon(Environment e) { // NO_UCD (unused code)
     836        static boolean unclosed_multipolygon(Environment e) {
    837837            return e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() &&
    838838                    !e.osm.isIncomplete() && !((Relation) e.osm).hasIncompleteMembers() &&
     
    848848         * @see InDataSourceArea
    849849         */
    850         static boolean inDownloadedArea(Environment e) { // NO_UCD (unused code)
     850        static boolean inDownloadedArea(Environment e) {
    851851            return e.osm instanceof OsmPrimitive && IN_DOWNLOADED_AREA.test((OsmPrimitive) e.osm);
    852852        }
    853853
    854         static boolean completely_downloaded(Environment e) { // NO_UCD (unused code)
     854        static boolean completely_downloaded(Environment e) {
    855855            if (e.osm instanceof IRelation<?>) {
    856856                return !((IRelation<?>) e.osm).hasIncompleteMembers();
     
    860860        }
    861861
    862         static boolean closed2(Environment e) { // NO_UCD (unused code)
     862        static boolean closed2(Environment e) {
    863863            if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed())
    864864                return true;
     
    870870        }
    871871
    872         static boolean selected(Environment e) { // NO_UCD (unused code)
     872        static boolean selected(Environment e) {
    873873            if (e.mc != null) {
    874874                e.getCascade().setDefaultSelectedHandling(false);
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Functions.java

    r17759 r17765  
    6666     * @return {@code o} unchanged
    6767     */
    68     public static Object eval(Object o) { // NO_UCD (unused code)
     68    public static Object eval(Object o) {
    6969        return o;
    7070    }
     
    7777     * @see Float#sum
    7878     */
    79     public static double plus(double a, double b) { // NO_UCD (unused code)
     79    public static double plus(double a, double b) {
    8080        return a + b;
    8181    }
     
    8787     * @return Subtraction of arguments
    8888     */
    89     public static double minus(double a, double b) { // NO_UCD (unused code)
     89    public static double minus(double a, double b) {
    9090        return a - b;
    9191    }
     
    9797     * @return Multiplication of arguments
    9898     */
    99     public static double times(double a, double b) { // NO_UCD (unused code)
     99    public static double times(double a, double b) {
    100100        return a * b;
    101101    }
     
    107107     * @return Division of arguments
    108108     */
    109     public static double divided_by(double a, double b) { // NO_UCD (unused code)
     109    public static double divided_by(double a, double b) {
    110110        return a / b;
    111111    }
     
    117117     * @return {@code a mod b}, e.g., {@code mod(7, 5) = 2}
    118118     */
    119     public static float mod(float a, float b) { // NO_UCD (unused code)
     119    public static float mod(float a, float b) {
    120120        return a % b;
    121121    }
     
    128128     * @see Arrays#asList(Object[])
    129129     */
    130     public static List<Object> list(Environment ignored, Object... args) { // NO_UCD (unused code)
     130    public static List<Object> list(Environment ignored, Object... args) {
    131131        return Arrays.asList(args);
    132132    }
     
    137137     * @return length of the list
    138138     */
    139     public static Integer count(List<?> lst) { // NO_UCD (unused code)
     139    public static Integer count(List<?> lst) {
    140140        return lst.size();
    141141    }
     
    150150     */
    151151    @NullableArguments
    152     public static Object any(Environment ignored, Object... args) { // NO_UCD (unused code)
     152    public static Object any(Environment ignored, Object... args) {
    153153        return Utils.firstNonNull(args);
    154154    }
     
    161161     * @since 5699
    162162     */
    163     public static Object get(List<?> lst, float n) { // NO_UCD (unused code)
     163    public static Object get(List<?> lst, float n) {
    164164        int idx = Math.round(n);
    165165        if (idx >= 0 && idx < lst.size()) {
     
    177177     * @since 5699
    178178     */
    179     public static List<String> split(String sep, String toSplit) { // NO_UCD (unused code)
     179    public static List<String> split(String sep, String toSplit) {
    180180        return Arrays.asList(toSplit.split(Pattern.quote(sep), -1));
    181181    }
     
    189189     * @see Color#Color(float, float, float)
    190190     */
    191     public static Color rgb(float r, float g, float b) { // NO_UCD (unused code)
     191    public static Color rgb(float r, float g, float b) {
    192192        try {
    193193            return new Color(r, g, b);
     
    208208     * @see Color#Color(float, float, float, float)
    209209     */
    210     public static Color rgba(float r, float g, float b, float alpha) { // NO_UCD (unused code)
     210    public static Color rgba(float r, float g, float b, float alpha) {
    211211        try {
    212212            return new Color(r, g, b, alpha);
     
    224224     * @return the corresponding color
    225225     */
    226     public static Color hsb_color(float h, float s, float b) { // NO_UCD (unused code)
     226    public static Color hsb_color(float h, float s, float b) {
    227227        try {
    228228            return Color.getHSBColor(h, s, b);
     
    238238     * @return color matching the given notation
    239239     */
    240     public static Color html2color(String html) { // NO_UCD (unused code)
     240    public static Color html2color(String html) {
    241241        return ColorHelper.html2color(html);
    242242    }
     
    247247     * @return HTML notation matching the given color
    248248     */
    249     public static String color2html(Color c) { // NO_UCD (unused code)
     249    public static String color2html(Color c) {
    250250        return ColorHelper.color2html(c);
    251251    }
     
    257257     * @see java.awt.Color#getRed()
    258258     */
    259     public static float red(Color c) { // NO_UCD (unused code)
     259    public static float red(Color c) {
    260260        return ColorHelper.int2float(c.getRed());
    261261    }
     
    267267     * @see java.awt.Color#getGreen()
    268268     */
    269     public static float green(Color c) { // NO_UCD (unused code)
     269    public static float green(Color c) {
    270270        return ColorHelper.int2float(c.getGreen());
    271271    }
     
    277277     * @see java.awt.Color#getBlue()
    278278     */
    279     public static float blue(Color c) { // NO_UCD (unused code)
     279    public static float blue(Color c) {
    280280        return ColorHelper.int2float(c.getBlue());
    281281    }
     
    287287     * @see java.awt.Color#getAlpha()
    288288     */
    289     public static float alpha(Color c) { // NO_UCD (unused code)
     289    public static float alpha(Color c) {
    290290        return ColorHelper.int2float(c.getAlpha());
    291291    }
     
    299299     */
    300300    @NullableArguments
    301     public static String concat(Environment ignored, Object... args) { // NO_UCD (unused code)
     301    public static String concat(Environment ignored, Object... args) {
    302302        return Arrays.stream(args)
    303303                .filter(Objects::nonNull)
     
    314314     */
    315315    @NullableArguments
    316     public static String join(Environment ignored, String... args) { // NO_UCD (unused code)
     316    public static String join(Environment ignored, String... args) {
    317317        return String.join(args[0], Arrays.asList(args).subList(1, args.length));
    318318    }
     
    325325     * @see String#join
    326326     */
    327     public static String join_list(final String separator, final List<String> values) { // NO_UCD (unused code)
     327    public static String join_list(final String separator, final List<String> values) {
    328328        return String.join(separator, values);
    329329    }
     
    335335     * @return the property value
    336336     */
    337     public static Object prop(final Environment env, String key) { // NO_UCD (unused code)
     337    public static Object prop(final Environment env, String key) {
    338338        return prop(env, key, null);
    339339    }
     
    356356     * @return {@code true} if the property is set, {@code false} otherwise
    357357     */
    358     public static Boolean is_prop_set(final Environment env, String key) { // NO_UCD (unused code)
     358    public static Boolean is_prop_set(final Environment env, String key) {
    359359        return is_prop_set(env, key, null);
    360360    }
     
    377377     * @return the value for given key
    378378     */
    379     public static String tag(final Environment env, String key) { // NO_UCD (unused code)
     379    public static String tag(final Environment env, String key) {
    380380        return env.osm == null ? null : env.osm.get(key);
    381381    }
     
    389389     * @since 15315
    390390     */
    391     public static List<String> tag_regex(final Environment env, String keyRegex) { // NO_UCD (unused code)
     391    public static List<String> tag_regex(final Environment env, String keyRegex) {
    392392        return tag_regex(env, keyRegex, "");
    393393    }
     
    404404     * @since 15315
    405405     */
    406     public static List<String> tag_regex(final Environment env, String keyRegex, String flags) { // NO_UCD (unused code)
     406    public static List<String> tag_regex(final Environment env, String keyRegex, String flags) {
    407407        int f = parse_regex_flags(flags);
    408408        Pattern compiled = Pattern.compile(keyRegex, f);
     
    440440     * @return first non-null value of the key {@code key} from the object's parent(s)
    441441     */
    442     public static String parent_tag(final Environment env, String key) { // NO_UCD (unused code)
     442    public static String parent_tag(final Environment env, String key) {
    443443        if (env.parent == null) {
    444444            if (env.osm != null) {
     
    462462     * @return a list of non-null values of the key {@code key} from the object's parent(s)
    463463     */
    464     public static List<String> parent_tags(final Environment env, String key) { // NO_UCD (unused code)
     464    public static List<String> parent_tags(final Environment env, String key) {
    465465        if (env.parent == null) {
    466466            if (env.osm != null) {
     
    483483     * @return the value of the key {@code key} from the object's child, or {@code null} if there is no child
    484484     */
    485     public static String child_tag(final Environment env, String key) { // NO_UCD (unused code)
     485    public static String child_tag(final Environment env, String key) {
    486486        return env.child == null ? null : env.child.get(key);
    487487    }
     
    495495     * @see IPrimitive#getUniqueId()
    496496     */
    497     public static Long parent_osm_id(final Environment env) { // NO_UCD (unused code)
     497    public static Long parent_osm_id(final Environment env) {
    498498        return env.parent == null ? null : env.parent.getUniqueId();
    499499    }
     
    506506     * @since 14802
    507507     */
    508     public static double gpx_distance(final Environment env) { // NO_UCD (unused code)
     508    public static double gpx_distance(final Environment env) {
    509509        if (env.osm instanceof OsmPrimitive) {
    510510            return MainApplication.getLayerManager().getAllGpxData().stream()
     
    521521     * @return {@code true} if the object has a tag with the given key, {@code false} otherwise
    522522     */
    523     public static boolean has_tag_key(final Environment env, String key) { // NO_UCD (unused code)
     523    public static boolean has_tag_key(final Environment env, String key) {
    524524        return env.osm.hasKey(key);
    525525    }
     
    530530     * @return the index as float. Starts at 1
    531531     */
    532     public static Float index(final Environment env) { // NO_UCD (unused code)
     532    public static Float index(final Environment env) {
    533533        if (env.index == null) {
    534534            return null;
     
    544544     * @since 15279
    545545     */
    546     public static List<String> sort(Environment ignored, String... sortables) { // NO_UCD (unused code)
     546    public static List<String> sort(Environment ignored, String... sortables) {
    547547        Arrays.parallelSort(sortables);
    548548        return Arrays.asList(sortables);
     
    555555     * @since 15279
    556556     */
    557     public static List<String> sort_list(List<String> sortables) { // NO_UCD (unused code)
     557    public static List<String> sort_list(List<String> sortables) {
    558558        Collections.sort(sortables);
    559559        return sortables;
     
    567567     * @since 15323
    568568     */
    569     public static List<String> uniq(Environment ignored, String... values) { // NO_UCD (unused code)
     569    public static List<String> uniq(Environment ignored, String... values) {
    570570        return uniq_list(Arrays.asList(values));
    571571    }
     
    587587     * @see Environment#getRole()
    588588     */
    589     public static String role(final Environment env) { // NO_UCD (unused code)
     589    public static String role(final Environment env) {
    590590        return env.getRole();
    591591    }
     
    598598     * @since 15196
    599599     */
    600     public static int count_roles(final Environment env, String... roles) { // NO_UCD (unused code)
     600    public static int count_roles(final Environment env, String... roles) {
    601601        int rValue = 0;
    602602        if (env.osm instanceof Relation) {
     
    616616     * @see Geometry#computeArea(IPrimitive)
    617617     */
    618     public static Float areasize(final Environment env) { // NO_UCD (unused code)
     618    public static Float areasize(final Environment env) {
    619619        final Double area = Geometry.computeArea(env.osm);
    620620        return area == null ? null : area.floatValue();
     
    627627     * @see Way#getLength()
    628628     */
    629     public static Float waylength(final Environment env) { // NO_UCD (unused code)
     629    public static Float waylength(final Environment env) {
    630630        if (env.osm instanceof Way) {
    631631            return (float) ((Way) env.osm).getLength();
     
    640640     * @return {@code true} if {@code !b}
    641641     */
    642     public static boolean not(boolean b) { // NO_UCD (unused code)
     642    public static boolean not(boolean b) {
    643643        return !b;
    644644    }
     
    650650     * @return {@code true} if {@code a >= b}
    651651     */
    652     public static boolean greater_equal(float a, float b) { // NO_UCD (unused code)
     652    public static boolean greater_equal(float a, float b) {
    653653        return a >= b;
    654654    }
     
    660660     * @return {@code true} if {@code a <= b}
    661661     */
    662     public static boolean less_equal(float a, float b) { // NO_UCD (unused code)
     662    public static boolean less_equal(float a, float b) {
    663663        return a <= b;
    664664    }
     
    670670     * @return {@code true} if {@code a > b}
    671671     */
    672     public static boolean greater(float a, float b) { // NO_UCD (unused code)
     672    public static boolean greater(float a, float b) {
    673673        return a > b;
    674674    }
     
    680680     * @return {@code true} if {@code a < b}
    681681     */
    682     public static boolean less(float a, float b) { // NO_UCD (unused code)
     682    public static boolean less(float a, float b) {
    683683        return a < b;
    684684    }
     
    690690     * @see Math#toRadians(double)
    691691     */
    692     public static double degree_to_radians(double degree) { // NO_UCD (unused code)
     692    public static double degree_to_radians(double degree) {
    693693        return Utils.toRadians(degree);
    694694    }
     
    703703     * @see RotationAngle#parseCardinalRotation(String)
    704704     */
    705     public static Double cardinal_to_radians(String cardinal) { // NO_UCD (unused code)
     705    public static Double cardinal_to_radians(String cardinal) {
    706706        try {
    707707            return RotationAngle.parseCardinalRotation(cardinal);
     
    732732     * @see Object#equals(Object)
    733733     */
    734     public static boolean not_equal(Object a, Object b) { // NO_UCD (unused code)
     734    public static boolean not_equal(Object a, Object b) {
    735735        return !equal(a, b);
    736736    }
     
    743743     * @see SearchCompiler
    744744     */
    745     public static Boolean JOSM_search(final Environment env, String searchStr) { // NO_UCD (unused code)
     745    public static Boolean JOSM_search(final Environment env, String searchStr) {
    746746        Match m;
    747747        try {
     
    766766     * @return value for key, or default value if not found
    767767     */
    768     public static String JOSM_pref(Environment env, String key, String def) { // NO_UCD (unused code)
     768    public static String JOSM_pref(Environment env, String key, String def) {
    769769        return MapPaintStyles.getStyles().getPreferenceCached(env != null ? env.source : null, key, def);
    770770    }
     
    778778     * @since 5699
    779779     */
    780     public static boolean regexp_test(String pattern, String target) { // NO_UCD (unused code)
     780    public static boolean regexp_test(String pattern, String target) {
    781781        return Pattern.matches(pattern, target);
    782782    }
     
    793793     * @since 5699
    794794     */
    795     public static boolean regexp_test(String pattern, String target, String flags) { // NO_UCD (unused code)
     795    public static boolean regexp_test(String pattern, String target, String flags) {
    796796        int f = parse_regex_flags(flags);
    797797        return Pattern.compile(pattern, f).matcher(target).matches();
     
    811811     * @since 5701
    812812     */
    813     public static List<String> regexp_match(String pattern, String target, String flags) { // NO_UCD (unused code)
     813    public static List<String> regexp_match(String pattern, String target, String flags) {
    814814        int f = parse_regex_flags(flags);
    815815        return Utils.getMatches(Pattern.compile(pattern, f).matcher(target));
     
    825825     * @since 5701
    826826     */
    827     public static List<String> regexp_match(String pattern, String target) { // NO_UCD (unused code)
     827    public static List<String> regexp_match(String pattern, String target) {
    828828        return Utils.getMatches(Pattern.compile(pattern).matcher(target));
    829829    }
     
    835835     * @see IPrimitive#getUniqueId()
    836836     */
    837     public static long osm_id(final Environment env) { // NO_UCD (unused code)
     837    public static long osm_id(final Environment env) {
    838838        return env.osm.getUniqueId();
    839839    }
     
    846846     * @since 15246
    847847     */
    848     public static String osm_user_name(final Environment env) { // NO_UCD (unused code)
     848    public static String osm_user_name(final Environment env) {
    849849        return env.osm.getUser().getName();
    850850    }
     
    857857     * @since 15246
    858858     */
    859     public static long osm_user_id(final Environment env) { // NO_UCD (unused code)
     859    public static long osm_user_id(final Environment env) {
    860860        return env.osm.getUser().getId();
    861861    }
     
    868868     * @since 15246
    869869     */
    870     public static int osm_version(final Environment env) { // NO_UCD (unused code)
     870    public static int osm_version(final Environment env) {
    871871        return env.osm.getVersion();
    872872    }
     
    879879     * @since 15246
    880880     */
    881     public static int osm_changeset_id(final Environment env) { // NO_UCD (unused code)
     881    public static int osm_changeset_id(final Environment env) {
    882882        return env.osm.getChangesetId();
    883883    }
     
    890890     * @since 15246
    891891     */
    892     public static int osm_timestamp(final Environment env) { // NO_UCD (unused code)
     892    public static int osm_timestamp(final Environment env) {
    893893        return env.osm.getRawTimestamp();
    894894    }
     
    902902     */
    903903    @NullableArguments
    904     public static String tr(Environment ignored, String... args) { // NO_UCD (unused code)
     904    public static String tr(Environment ignored, String... args) {
    905905        final String text = args[0];
    906906        System.arraycopy(args, 1, args, 0, args.length - 1);
     
    915915     * @see String#substring(int)
    916916     */
    917     public static String substring(String s, /* due to missing Cascade.convertTo for int*/ float begin) { // NO_UCD (unused code)
     917    public static String substring(String s, /* due to missing Cascade.convertTo for int*/ float begin) {
    918918        return s == null ? null : s.substring((int) begin);
    919919    }
     
    928928     * @see String#substring(int, int)
    929929     */
    930     public static String substring(String s, float begin, float end) { // NO_UCD (unused code)
     930    public static String substring(String s, float begin, float end) {
    931931        return s == null ? null : s.substring((int) begin, (int) end);
    932932    }
     
    940940     * @see String#replace(CharSequence, CharSequence)
    941941     */
    942     public static String replace(String s, String target, String replacement) { // NO_UCD (unused code)
     942    public static String replace(String s, String target, String replacement) {
    943943        return s == null ? null : s.replace(target, replacement);
    944944    }
     
    10551055     * @return the encoded string
    10561056     */
    1057     public static String URL_encode(String s) { // NO_UCD (unused code)
     1057    public static String URL_encode(String s) {
    10581058        return s == null ? null : Utils.encodeUrl(s);
    10591059    }
     
    10661066     * @return the encoded string
    10671067     */
    1068     public static String XML_encode(String s) { // NO_UCD (unused code)
     1068    public static String XML_encode(String s) {
    10691069        return s == null ? null : XmlWriter.encode(s);
    10701070    }
     
    10751075     * @return long value from 0 to 2^32-1
    10761076     */
    1077     public static long CRC32_checksum(String s) { // NO_UCD (unused code)
     1077    public static long CRC32_checksum(String s) {
    10781078        CRC32 cs = new CRC32();
    10791079        cs.update(s.getBytes(StandardCharsets.UTF_8));
     
    11291129     */
    11301130    @NullableArguments
    1131     public static Object print(Object o) { // NO_UCD (unused code)
     1131    public static Object print(Object o) {
    11321132        System.out.print(o == null ? "none" : o.toString());
    11331133        return o;
     
    11411141     */
    11421142    @NullableArguments
    1143     public static Object println(Object o) { // NO_UCD (unused code)
     1143    public static Object println(Object o) {
    11441144        System.out.println(o == null ? "none" : o.toString());
    11451145        return o;
     
    11511151     * @return number of tags
    11521152     */
    1153     public static int number_of_tags(Environment env) { // NO_UCD (unused code)
     1153    public static int number_of_tags(Environment env) {
    11541154        return env.osm.getNumKeys();
    11551155    }
     
    11611161     * @return the value of the setting (calculated when the style is loaded)
    11621162     */
    1163     public static Object setting(Environment env, String key) { // NO_UCD (unused code)
     1163    public static Object setting(Environment env, String key) {
    11641164        return env.source.settingValues.get(key);
    11651165    }
     
    11711171     * @since 11247
    11721172     */
    1173     public static LatLon center(Environment env) { // NO_UCD (unused code)
     1173    public static LatLon center(Environment env) {
    11741174        return env.osm instanceof Node ? ((Node) env.osm).getCoor() : env.osm.getBBox().getCenter();
    11751175    }
     
    11821182     * @since 11247
    11831183     */
    1184     public static boolean inside(Environment env, String codes) { // NO_UCD (unused code)
     1184    public static boolean inside(Environment env, String codes) {
    11851185        return Arrays.stream(codes.toUpperCase(Locale.ENGLISH).split(",", -1))
    11861186                .anyMatch(code -> Territories.isIso3166Code(code.trim(), center(env)));
     
    11941194     * @since 11247
    11951195     */
    1196     public static boolean outside(Environment env, String codes) { // NO_UCD (unused code)
     1196    public static boolean outside(Environment env, String codes) {
    11971197        return !inside(env, codes);
    11981198    }
     
    12061206     * @since 12514
    12071207     */
    1208     public static boolean at(Environment env, double lat, double lon) { // NO_UCD (unused code)
     1208    public static boolean at(Environment env, double lat, double lon) {
    12091209        return new LatLon(lat, lon).equalsEpsilon(center(env));
    12101210    }
     
    12171217     * @since 16110
    12181218     */
    1219     public static boolean to_boolean(String value) { // NO_UCD (unused code)
     1219    public static boolean to_boolean(String value) {
    12201220        return Boolean.parseBoolean(value);
    12211221    }
     
    12281228     * @since 16110
    12291229     */
    1230     public static byte to_byte(String value) { // NO_UCD (unused code)
     1230    public static byte to_byte(String value) {
    12311231        return Byte.parseByte(value);
    12321232    }
     
    12391239     * @since 16110
    12401240     */
    1241     public static short to_short(String value) { // NO_UCD (unused code)
     1241    public static short to_short(String value) {
    12421242        return Short.parseShort(value);
    12431243    }
     
    12501250     * @since 16110
    12511251     */
    1252     public static int to_int(String value) { // NO_UCD (unused code)
     1252    public static int to_int(String value) {
    12531253        return Integer.parseInt(value);
    12541254    }
     
    12611261     * @since 16110
    12621262     */
    1263     public static long to_long(String value) { // NO_UCD (unused code)
     1263    public static long to_long(String value) {
    12641264        return Long.parseLong(value);
    12651265    }
     
    12721272     * @since 16110
    12731273     */
    1274     public static float to_float(String value) { // NO_UCD (unused code)
     1274    public static float to_float(String value) {
    12751275        return Float.parseFloat(value);
    12761276    }
     
    12831283     * @since 16110
    12841284     */
    1285     public static double to_double(String value) { // NO_UCD (unused code)
     1285    public static double to_double(String value) {
    12861286        return Double.parseDouble(value);
    12871287    }
Note: See TracChangeset for help on using the changeset viewer.