Changeset 2067 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-09-06T13:13:59+02:00 (15 years ago)
Author:
stoecker
Message:

added isUsable() to primitives to replace (!incomplete && !deleted) checks with a more descriptive variant

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r2025 r2067  
    160160    /**
    161161     * Replies <code>true</code>, if the object has been deleted.
    162      * 
     162     *
    163163     * @return <code>true</code>, if the object has been deleted.
    164164     * @see #delete(boolean)
     
    166166    public boolean isDeleted() {
    167167        return deleted;
     168    }
     169
     170    /**
     171     * Replies <code>true</code>, if the object is usable.
     172     *
     173     * @return <code>true</code>, if the object is unusable.
     174     * @see #delete(boolean)
     175     */
     176    public boolean isUsable() {
     177        return !deleted && !incomplete;
    168178    }
    169179
  • trunk/src/org/openstreetmap/josm/gui/BookmarkList.java

    r2053 r2067  
    1414import org.openstreetmap.josm.Main;
    1515import org.openstreetmap.josm.data.Preferences;
    16 
    17 import sun.security.action.GetBooleanAction;
    1816
    1917/**
Note: See TracChangeset for help on using the changeset viewer.