src/androidTest/java/de/blau/android/propertyeditor/PropertyEditorTest.java
/**
     * Check if the OsmELement e has a specific role in one of its parent relations
     * 
     * @param role the role
     * @param e the OsmElement
     * @param parents the parent Relations
     * @return true if the role was found
     */
Check if the OsmELement e has a specific role in one of its parent relations

@param role the role
@param e the OsmElement
@param parents the parent Relations
@return true if the role was found
Check if the OsmELement e has a specific role in one of its parent relations @param role the role @param e the OsmElement @param parents the parent Relations @return true if the role was found
private boolean findRole(@NonNull String role, @NonNull OsmElement e, @NonNull List<Relation> parents) {
        for (Relation parent : parents) {
            List<RelationMember> members = parent.getAllMembers(e);
            for (RelationMember member : members) {
                if (role.equals(member.getRole())) {
                    return true;
                }
            }
        }
        return false;
    }
private boolean findRole ( @ NonNull String role , @ NonNull OsmElement e , @ NonNull List < Relation > parents ) { for ( Relation parent : parents ) { List < RelationMember > members = parent . getAllMembers ( e ) ; for ( RelationMember member : members ) { if ( role . equals ( member . getRole ( ) ) ) { return true ; } } } return false ; }
Check if the OsmELement e has a specific role in one of its parent relations
Check if the OsmELement e has a specific role in one of its parent relations