class OSMRoadClassParser implements TagParser {

    @Override
    public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay readerWay, boolean ferry, IntsRef relationFlags) {
        if (ferry)
            return edgeFlags;

        String roadClassTag = readerWay.getTag("highway");
        if (roadClassTag == null)
            return edgeFlags;
        RoadClass roadClass = RoadClass.find(roadClassTag);
        if (roadClass == OTHER && roadClassTag.endsWith("_link"))
            roadClass = RoadClass.find(roadClassTag.substring(0, roadClassTag.length() - 5));

        if (roadClass != OTHER)
            roadClassEnc.setEnum(false, edgeFlags, roadClass);
        return edgeFlags;
    }

    public  OSMRoadClassParser();

}