@Override
    public Optional<RawFlag> fetch(FlagId id, FetchVector vector) {
        return Optional.ofNullable(getAllFlagData().get(id)).flatMap(flagData -> flagData.resolve(vector));
    }
Java API for a flag database stored in a single file

@author hakonhall
flags/src/main/java/com/yahoo/vespa/flags/file/FlagDbFile.java