Ticket #21867: javadoc.patch
| File javadoc.patch, 5.7 KB (added by , 4 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
711 711 } 712 712 713 713 /** 714 * {@code closed} tests whether the way is closed or the relation is a closed multipolygon714 * {@code :closed} tests whether the way is closed or the relation is a closed multipolygon 715 715 * @param e MapCSS environment 716 716 * @return {@code true} if the way is closed or the relation is a closed multipolygon 717 717 */ … … 718 718 static boolean closed(Environment e) { 719 719 if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed()) 720 720 return true; 721 return e.osm instanceof IRelation<?> && ((IRelation<?>) e.osm).isMultipolygon();721 return e.osm instanceof IRelation<?> && e.osm.isMultipolygon(); 722 722 } 723 723 724 724 /** … … 732 732 } 733 733 734 734 /** 735 * {@code ;new} tests whether the object is new.735 * {@code :new} tests whether the object is new. 736 736 * @param e MapCSS environment 737 737 * @return {@code true} if the object is new 738 738 * @see IPrimitive#isNew() … … 783 783 } 784 784 785 785 /** 786 * {@code unconnected}: tests whether the object is aunconnected node.786 * {@code :unconnected} tests whether the object is an unconnected node. 787 787 * @param e MapCSS environment 788 * @return {@code true} if the object is a unconnected node788 * @return {@code true} if the object is an unconnected node 789 789 */ 790 790 static boolean unconnected(Environment e) { 791 791 return e.osm instanceof Node && ((Node) e.osm).getParentWays().isEmpty(); … … 792 792 } 793 793 794 794 /** 795 * {@code righthandtraffic} checks if there is right-hand traffic at the current location.795 * {@code :righthandtraffic} checks if there is right-hand traffic at the current location. 796 796 * @param e MapCSS environment 797 797 * @return {@code true} if there is right-hand traffic at the current location 798 798 * @see Functions#is_right_hand_traffic(Environment) … … 802 802 } 803 803 804 804 /** 805 * {@code clockwise} whether the way is closed and oriented clockwise,805 * {@code :clockwise} whether the way is closed and oriented clockwise, 806 806 * or non-closed and the 1st, 2nd and last node are in clockwise order. 807 807 * @param e MapCSS environment 808 808 * @return {@code true} if the way clockwise … … 813 813 } 814 814 815 815 /** 816 * {@code anticlockwise} whether the way is closed and oriented anticlockwise,816 * {@code :anticlockwise} whether the way is closed and oriented anticlockwise, 817 817 * or non-closed and the 1st, 2nd and last node are in anticlockwise order. 818 818 * @param e MapCSS environment 819 819 * @return {@code true} if the way clockwise … … 824 824 } 825 825 826 826 /** 827 * {@code unclosed-multipolygon} tests whether the object is an unclosed multipolygon.827 * {@code :unclosed-multipolygon} tests whether the object is an unclosed multipolygon. 828 828 * @param e MapCSS environment 829 829 * @return {@code true} if the object is an unclosed multipolygon 830 830 */ … … 837 837 private static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new InDataSourceArea(false); 838 838 839 839 /** 840 * {@code in-downloaded-area} tests whether the object is within source area ("downloaded area").840 * {@code :in-downloaded-area} tests whether the object is within source area ("downloaded area"). 841 841 * @param e MapCSS environment 842 842 * @return {@code true} if the object is within source area ("downloaded area") 843 843 * @see InDataSourceArea … … 846 846 return e.osm instanceof OsmPrimitive && IN_DOWNLOADED_AREA.test((OsmPrimitive) e.osm); 847 847 } 848 848 849 /** 850 * {@code :completely_downloaded} tests whether the object is completely downloaded 851 * @param e MapCSS environment 852 * @return {@code true} if the object is completely downloaded 853 */ 849 854 static boolean completely_downloaded(Environment e) { 850 855 if (e.osm instanceof IRelation<?>) { 851 856 return !((IRelation<?>) e.osm).hasIncompleteMembers(); … … 861 866 static boolean closed2(Environment e) { 862 867 if (e.osm instanceof IWay<?> && ((IWay<?>) e.osm).isClosed()) 863 868 return true; 864 if (e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon()) {869 if (e.osm instanceof Relation && e.osm.isMultipolygon()) { 865 870 Multipolygon multipolygon = MultipolygonCache.getInstance().get((Relation) e.osm); 866 871 return multipolygon != null && multipolygon.getOpenEnds().isEmpty(); 867 872 } … … 868 873 return false; 869 874 } 870 875 876 /** 877 * {@code :selected} tests whether the object is selected in the editor 878 * @param e MapCSS environment 879 * @return {@code true} if the object is selected 880 */ 871 881 static boolean selected(Environment e) { 872 882 if (e.mc != null) { 873 883 e.getCascade().setDefaultSelectedHandling(false); … … 876 886 } 877 887 878 888 /** 879 * Check if the object is highlighted (i.e.,is hovered over)889 * {@code :highlighted} tests whether the object is highlighted (i.e. is hovered over) 880 890 * @param e The MapCSS environment 881 891 * @return {@code true} if the object is highlighted 882 892 * @see IPrimitive#isHighlighted
