public static boolean isTurnForbidden(final TurnRestriction first, final int fromLon, final int fromLat, final int toLon, final int toLat, final boolean bikeMode, final boolean carMode) {
        boolean hasAnyPositive = false;
        boolean hasPositive = false;
        boolean hasNegative = false;
        TurnRestriction tr = first;
        while (tr != null) {
            if ((tr.exceptBikes() && bikeMode) || (tr.exceptMotorcars() && carMode)) {
                tr = tr.next;
                continue;
            }
            if (tr.fromLon == fromLon && tr.fromLat == fromLat) {
                if (tr.isPositive) {
                    hasAnyPositive = true;
                }
                if (tr.toLon == toLon && tr.toLat == toLat) {
                    if (tr.isPositive) {
                        hasPositive = true;
                    } else {
                        hasNegative = true;
                    }
                }
            }
            tr = tr.next;
        }
        return !hasPositive && (hasAnyPositive || hasNegative);
    }
Container for a turn restriction

@author ab
main/src/main/java/cgeo/geocaching/brouter/mapaccess/TurnRestriction.java