* or {@code false} if it should be unrestricted */ public WebContentGenerator(boolean restrictDefaultSupportedMethods) { if (restrictDefaultSupportedMethods) { this.supportedMethods = new HashSet<String>(4); this.supportedMethods.add(METHOD_GET); this.supportedMethods.add(METHOD_HEAD); this.supportedMethods.add(METHOD_POST); } } /** * Create a new WebContentGenerator. * @param supportedMethods the supported HTTP methods for this content generator */ public WebContentGenerator(String... supportedMethods) { this.supportedMethods = new HashSet<String>(Arrays.asList(supportedMethods)); }