Ignore:
Timestamp:
2006-03-14T01:47:55+01:00 (19 years ago)
Author:
imi
Message:
  • implemented 0.3 API
  • enabled upload of ways
  • switched to MinML (GPX still uses JDOM)
  • changed assumed server precision to 10-12 (was 10-13)
File:
1 edited

Legend:

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

    r35 r58  
    11package org.openstreetmap.josm.data.osm;
    22
     3import java.util.HashMap;
    34import java.util.Map;
    45
     
    1011 * An OSM primitive can be associated with a key/value pair. It can be created, deleted
    1112 * and updated within the OSM-Server.
    12  *
     13 *
     14 * Although OsmPrimitive is designed as a base class, it is not to be meant to subclass
     15 * it by any other than from the package org.openstreetmap.josm.data.osm (thus the
     16 * visibility of the constructor). The available primitives are a fixed set that are given
     17 * by the server environment and not an extendible data stuff.
     18 *
    1319 * @author imi
    1420 */
    1521abstract public class OsmPrimitive {
    16 
    1722
    1823        /**
     
    129134                return id == 0 ? super.hashCode() : (int)id;
    130135        }
     136
     137        /**
     138         * Set the given value to the given key
     139         * @param key The key, for which the value is to be set.
     140         * @param value The value for the key.
     141         */
     142        public void put(Key key, String value) {
     143                if (keys == null)
     144                        keys = new HashMap<Key, String>();
     145                keys.put(key, value);
     146        }
    131147}
Note: See TracChangeset for help on using the changeset viewer.