class ImmutableLabel implements Label {

    public static Label of(final CharSequence labelValue) {
        argumentNotEmpty(labelValue, "label value");

        final Validator validator = NoControlCharactersNoSlashesValidator.getInstance(labelValue);
        if (!validator.isValid()) {
            throw PolicyEntryInvalidException.newBuilder()
                    .message("The Policy Label " + labelValue + " is invalid")
                    .description(validator.getReason().orElse(null))
                    .build();
        }

        return new ImmutableLabel(labelValue.toString());
    }

    private  ImmutableLabel(final String theLabelValue);

}