
com.joehxblog.spring.csp.value.Value Maven / Gradle / Ivy
package com.joehxblog.spring.csp.value;
import java.util.Arrays;
/**
* Values
*/
public interface Value {
/**
* @return an array of all the hard-coded values in enums
* {@link KeywordValue} and {@link UnsafeKeywordValue}.
*/
static Value[] values() {
Value[][] values = {
KeywordValue.values(),
UnsafeKeywordValue.values()
};
return Arrays.stream(values)
.flatMap(Arrays::stream)
.toArray(Value[]::new);
}
static String stringify(String string) {
return "'" + string.toLowerCase().replace('_', '-') + "'";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy