class Codecs {

    boolean isEncodable(DiscreteResource resource) {
        return resource.valueAs(Object.class)
                .map(Object::getClass)
                .map(codecs::containsKey)
                .orElse(Boolean.FALSE);
    }

    private  Codecs();

}