Changeset 11342 in josm for trunk/src


Ignore:
Timestamp:
2016-11-29T01:52:46+01:00 (3 years ago)
Author:
Don-vip
Message:

javadoc

File:
1 edited

Legend:

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

    r11100 r11342  
    7272public class Storage<T> extends AbstractSet<T> {
    7373
     74    /**
     75     * Hash for {@link PrimitiveId}.
     76     */
    7477    public static class PrimitiveIdHash implements Hash<PrimitiveId, PrimitiveId> {
    7578
     
    111114    }
    112115
     116    /**
     117     * Constructs a new {@code Storage} with given hash.
     118     * @param ha hash
     119     */
    113120    public Storage(Hash<? super T, ? super T> ha) {
    114121        this(ha, DEFAULT_CAPACITY, false);
    115122    }
    116123
     124    /**
     125     * Constructs a new {@code Storage}.
     126     * @param safeIterator If set to false, you must not modify the Storage while iterating over it.
     127     * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage.
     128     * This is similar to CopyOnWriteArrayList.
     129     */
    117130    public Storage(boolean safeIterator) {
    118131        this(Storage.<T>defaultHash(), DEFAULT_CAPACITY, safeIterator);
    119132    }
    120133
     134    /**
     135     * Constructs a new {@code Storage} with given capacity.
     136     * @param capacity capacity
     137     * @param safeIterator If set to false, you must not modify the Storage while iterating over it.
     138     * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage.
     139     * This is similar to CopyOnWriteArrayList.
     140     */
    121141    public Storage(int capacity, boolean safeIterator) {
    122142        this(Storage.<T>defaultHash(), capacity, safeIterator);
    123143    }
    124144
     145    /**
     146     * Constructs a new {@code Storage} with given hash.
     147     * @param ha hash
     148     * @param safeIterator If set to false, you must not modify the Storage while iterating over it.
     149     * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage.
     150     * This is similar to CopyOnWriteArrayList.
     151     */
    125152    public Storage(Hash<? super T, ? super T> ha, boolean safeIterator) {
    126153        this(ha, DEFAULT_CAPACITY, safeIterator);
    127154    }
    128155
     156    /**
     157     * Constructs a new {@code Storage} with given hash and capacity.
     158     * @param ha hash
     159     * @param capacity capacity
     160     */
    129161    public Storage(Hash<? super T, ? super T> ha, int capacity) {
    130162        this(ha, capacity, false);
     
    132164
    133165    /**
    134      * constructor
     166     * Constructs a new {@code Storage} with given hash and capacity.
    135167     * @param ha hash
    136168     * @param capacity capacity
    137      * @param safeIterator If set to false, you must not modify the Storage
    138      *          while iterating over it. If set to true, you can safely
    139      *          modify, but the read-only iteration will happen on a copy
    140      *          of the unmodified Storage.
    141      *          This is similar to CopyOnWriteArrayList.
     169     * @param safeIterator If set to false, you must not modify the Storage while iterating over it.
     170     * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage.
     171     * This is similar to CopyOnWriteArrayList.
    142172     */
    143173    public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) {
Note: See TracChangeset for help on using the changeset viewer.