Changeset 7237 in josm for trunk/src/org
- Timestamp:
 - 2014-06-10T12:03:16+02:00 (11 years ago)
 - Location:
 - trunk/src/org/openstreetmap/josm
 - Files:
 - 
      
- 2 edited
 
- 
          
  data/osm/AbstractPrimitive.java (modified) (1 diff)
 - 
          
  gui/mappaint/mapcss/ExpressionFactory.java (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r7083 r7237 632 632 } 633 633 634 public final int getNumKeys() { 635 return keys == null ? 0 : keys.length / 2; 636 } 637 634 638 @Override 635 639 public final Collection<String> keySet() {  - 
      
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r7193 r7237 18 18 import java.util.Collections; 19 19 import java.util.List; 20 import java.util.Objects; 20 21 import java.util.regex.Matcher; 21 22 import java.util.regex.Pattern; … … 624 625 } 625 626 627 /** 628 * check if there is right-hand traffic at the current location 629 * @param env the environment 630 * @return true if there is right-hand traffic 631 * @since 7193 632 */ 626 633 public static boolean is_right_hand_traffic(Environment env) { 627 634 if (env.osm instanceof Node) 628 635 return RightAndLefthandTraffic.isRightHandTraffic(((Node) env.osm).getCoor()); 629 636 return RightAndLefthandTraffic.isRightHandTraffic(env.osm.getBBox().getCenter()); 637 } 638 639 /** 640 * Prints the object to the command line (for debugging purpose). 641 * @param o the object 642 * @return the same object, unchanged 643 */ 644 public static Object print(Object o) { 645 System.out.print(o == null ? "none" : o.toString()); 646 return o; 647 } 648 649 /** 650 * Prints the object to the command line, with new line at the end 651 * (for debugging purpose). 652 * @param o the object 653 * @return the same object, unchanged 654 */ 655 public static Object println(Object o) { 656 System.out.println(o == null ? "none" : o.toString()); 657 return o; 658 } 659 660 /** 661 * Get the number of tags for the current primitive. 662 * @param env 663 * @return number of tags 664 */ 665 public static int number_of_tags(Environment env) { 666 return env.osm.getNumKeys(); 630 667 } 631 668 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  