Ignore:
Timestamp:
2007-10-07T13:20:27+02:00 (17 years ago)
Author:
gebner
Message:

Merge 0.5.

File:
1 edited

Legend:

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

    r298 r343  
    33
    44import java.text.SimpleDateFormat;
     5import java.util.ArrayList;
    56import java.util.Collection;
    67import java.util.Collections;
     
    9091
    9192        /**
     93         * If set to true, this object is incomplete, which means only the id
     94         * and type is known (type is the objects instance class)
     95         */
     96        public boolean incomplete = false;
     97
     98        /**
    9299         * Implementation of the visitor scheme. Subclases have to call the correct
    93100         * visitor function.
     
    125132                Visitor v = new Visitor(){
    126133                        public void visit(Node n) { ret[0] = 1; }
    127                         public void visit(Segment s) { ret[0] = 2; }
    128                         public void visit(Way w) { ret[0] = 3; }
     134                        public void visit(Way w) { ret[0] = 2; }
     135                        public void visit(Relation e) { ret[0] = 3; }
    129136                };
    130137                visit(v);
    131                 return id == 0 ? super.hashCode() : (int)(id<<3)+ret[0];
     138                return id == 0 ? super.hashCode() : (int)(id<<2)+ret[0];
    132139        }
    133140
     
    205212                return timestamp == null ? null : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(timestamp);
    206213        }
     214       
     215       
    207216}
Note: See TracChangeset for help on using the changeset viewer.