[osmosis-dev] Tags class

Jochen Topf jochen at remote.org
Thu Feb 5 10:56:26 GMT 2009


On Thu, Feb 05, 2009 at 06:13:37AM +0100, Marcus Wolschon wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jochen Topf schrieb:
> > Having way.getTags().getIterator() and way.getTags().findByKey("x")
> > seems a bit cleaner to me than way.getTagsIterator() and
> > way.findTagByKey("x") etc. Also if it is done as a child class of List
> > or Container or something we'll get some things for free, like the
> > Iterator stuff.
> 
> Well, you`ll have to implement it twice then.
> Once for the unmodifyable lists/maps in the Entity-Classes
> and once for the mutable lists(WayNodes, RelationMembers)/maps(Tag,
> RelationMembers)
> in the Way/Node/Relation-Builder -classes.

Why do we have two implementations for Tags, one is modifiable and one
not? If we do have that we should bring those together, shouldn't we?
Isn't the unmodifiable thing only to make things easier for multithreading.
I haven't looked at the details, but I could imagine something like
class Node that has no setter methods and child class ModifiableNode that
has setter methods.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298





More information about the osmosis-dev mailing list