Package org.openstreetmap.josm.data.osm
Class RelationToChildReference
java.lang.Object
org.openstreetmap.josm.data.osm.RelationToChildReference
This is an extension of
RelationMember that stores the parent relation and the index in it in addition to the role/child.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRelationToChildReference(Relation parent, int position, String role, OsmPrimitive child) Create a newRelationToChildReferenceRelationToChildReference(Relation parent, int position, RelationMember member) Create a newRelationToChildReference -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChild()Get the actual childGet the parent relationintGet the position of the child in the parentstatic Set<RelationToChildReference>getRelationToChildReferences(Collection<? extends OsmPrimitive> children) Replies a set of allRelationToChildReferences for a collection of child primitivesstatic Set<RelationToChildReference>Replies a set of allRelationToChildReferences for a given child primitive.getRole()Get the role of the childinthashCode()
-
Field Details
-
parent
-
position
-
role
-
child
-
-
Constructor Details
-
RelationToChildReference
Create a newRelationToChildReference- Parameters:
parent- The parent relationposition- The position of the child in the parentrole- The role of the childchild- The actual child (member of parent)
-
RelationToChildReference
Create a newRelationToChildReference- Parameters:
parent- The parent relationposition- The position of the child in the parentmember- The role and relation for the child
-
-
Method Details
-
getRelationToChildReferences
Replies a set of allRelationToChildReferences for a given child primitive.- Parameters:
child- the child primitive- Returns:
- a set of all
RelationToChildReferences for a given child primitive
-
getRelationToChildReferences
public static Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) Replies a set of allRelationToChildReferences for a collection of child primitives- Parameters:
children- the collection of child primitives- Returns:
- a set of all
RelationToChildReferences to the children in the collection of child primitives
-
getParent
Get the parent relation- Returns:
- The parent
-
getPosition
Get the position of the child in the parent- Returns:
- The position of the child
-
getRole
Get the role of the child- Returns:
- The role
-
getChild
Get the actual child- Returns:
- The child
-
equals
-
hashCode
-