class OSMSurfaceParser implements TagParser {

    @Override
    public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay readerWay, boolean ferry, IntsRef relationFlags) {
        String surfaceTag = readerWay.getTag("surface");
        Surface surface = Surface.find(surfaceTag);
        if (surface == OTHER && !Helper.isEmpty(surfaceTag)) {
            if (surfaceTag.equals("metal"))
                surface = PAVED;
            else if (surfaceTag.equals("sett"))
                surface = COBBLESTONE;
            else if (surfaceTag.equals("wood"))
                surface = UNPAVED;
            else if (surfaceTag.equals("earth"))
                surface = DIRT;
        }

        if (surface != OTHER)
            surfaceEnc.setEnum(false, edgeFlags, surface);
        return edgeFlags;
    }

    public  OSMSurfaceParser();
    public  OSMSurfaceParser(EnumEncodedValue<Surface> surfaceEnc);

}