private void applyOppositeBicyclePermissions(Way way,EnumSet<EdgeStore.EdgeFlag> backward){
  String cyclewayLeftTagValue=way.getTag("cycleway:left");
  String cyclewayRightTagValue=way.getTag("cycleway:right");
  String cyclewayTagValue=way.getTag("cycleway");
  boolean addedBikePermissions=false;
  if (cyclewayTagValue != null && cyclewayTagValue.startsWith("opposite")) {
    backward.add(EdgeStore.EdgeFlag.ALLOWS_BIKE);
    addedBikePermissions=true;
  }
 else   if (cyclewayRightTagValue != null) {
    if (cyclewayRightTagValue.startsWith("opposite")) {
      backward.add(EdgeStore.EdgeFlag.ALLOWS_BIKE);
      addedBikePermissions=true;
    }
  }
  if (!addedBikePermissions && cyclewayLeftTagValue != null) {
    if (cyclewayLeftTagValue.startsWith("opposite")) {
      backward.add(EdgeStore.EdgeFlag.ALLOWS_BIKE);
    }
  }
}

private void applyOppositeBicyclePermissions ( Way way , EnumSet < EdgeStore . EdgeFlag > backward ) { String cyclewayLeftTagValue = way . getTag ( "cycleway:left" ) ; String cyclewayRightTagValue = way . getTag ( "cycleway:right" ) ; String cyclewayTagValue = way . getTag ( "cycleway" ) ; boolean addedBikePermissions = false ; if ( cyclewayTagValue != null && cyclewayTagValue . startsWith ( "opposite" ) ) { backward . add ( EdgeStore . EdgeFlag . ALLOWS_BIKE ) ; addedBikePermissions = true ; } else if ( cyclewayRightTagValue != null ) { if ( cyclewayRightTagValue . startsWith ( "opposite" ) ) { backward . add ( EdgeStore . EdgeFlag . ALLOWS_BIKE ) ; addedBikePermissions = true ; } } if ( ! addedBikePermissions && cyclewayLeftTagValue != null ) { if ( cyclewayLeftTagValue . startsWith ( "opposite" ) ) { backward . add ( EdgeStore . EdgeFlag . ALLOWS_BIKE ) ; } } }
adds allows bike to backward direction if one of those is true : - cycleway = starts with opposite ( can be opposite_track or opposite_lane ) - cycleway : left starts with opposite ( can be opposite_track or opposite_lane ) - cycleway : right starts with opposite ( can be opposite_track or opposite_lane )
