class ImmutablePolicyPlaceholder extends AbstractEntityPlaceholder<PolicyId> implements PolicyPlaceholder {

    @Override
    public Optional<String> resolve(final CharSequence policyId, final String placeholder) {
        argumentNotEmpty(placeholder, "placeholder");
        checkNotNull(policyId, "Policy ID");
        if (policyId instanceof PolicyId) {
            return doResolve(((PolicyId) policyId), placeholder);
        } else {
            return Optional.empty();
        }
    }

}