@Override
    public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags) {
        OSMValueExtractor.extractTons(edgeId, edgeIntAccess, way, weightEncoder, MAX_WEIGHT_TAGS);

        // vehicle:conditional no @ (weight > 7.5)
        for (String restriction : HGV_RESTRICTIONS) {
            String value = way.getTag(restriction, "");
            if (value.startsWith("no") && value.indexOf("@") < 6) { // no,none[ ]@
                double dec = OSMValueExtractor.conditionalWeightToTons(value);
                if (!Double.isNaN(dec)) weightEncoder.setDecimal(false, edgeId, edgeIntAccess, dec);
            }
        }
    }
@Test
    public void testConditionalTags() {
        EdgeIntAccess edgeIntAccess = new ArrayEdgeIntAccess(1);
        ReaderWay readerWay = new ReaderWay(1);
        readerWay.setTag("highway", "primary");
        readerWay.setTag("hgv:conditional", "no @ (weight > 7.5)");
        parser.handleWayTags(edgeId, edgeIntAccess, readerWay, relFlags);
        assertEquals(7.5, mwEnc.getDecimal(false, edgeId, edgeIntAccess), .01);

        edgeIntAccess = new ArrayEdgeIntAccess(1);
        readerWay.setTag("hgv:conditional", "none @ (weight > 10t)");
        parser.handleWayTags(edgeId, edgeIntAccess, readerWay, relFlags);
        assertEquals(10, mwEnc.getDecimal(false, edgeId, edgeIntAccess), .01);

        edgeIntAccess = new ArrayEdgeIntAccess(1);
        readerWay.setTag("hgv:conditional", "no@ (weight > 7)");
        parser.handleWayTags(edgeId, edgeIntAccess, readerWay, relFlags);
        assertEquals(7, mwEnc.getDecimal(false, edgeId, edgeIntAccess), .01);

        edgeIntAccess = new ArrayEdgeIntAccess(1);
        readerWay.setTag("hgv:conditional", "no @ (maxweight > 6)"); // allow different tagging
        parser.handleWayTags(edgeId, edgeIntAccess, readerWay, relFlags);
        assertEquals(6, mwEnc.getDecimal(false, edgeId, edgeIntAccess), .01);
    }