/** * Removes the specified element from the specified array. * * @param element The element to remove from the array. * @param array The array to remove the element from. * @return A new array with the element removed, or the original array if the array did not contain the element. */ public static Object[] remove(Object element, Object[] array) { if (! contains(element, array)) return array; List<Object> l = new ArrayList<>(array.length); for (Object o2 : array) { if (! element.equals(o2)) l.add(o2); } return l.toArray(new Object[l.size()]); } }
/** * Removes the specified element from the specified array. * * @param element The element to remove from the array. * @param array The array to remove the element from. * @return A new array with the element removed, or the original array if the array did not contain the element. */ public static Object[] remove(Object element, Object[] array) { if (! contains(element, array)) return array; List<Object> l = new ArrayList<>(array.length); for (Object o2 : array) { if (! element.equals(o2)) l.add(o2); } return l.toArray(new Object[l.size()]); } }
/** * Removes the specified element from the specified array. * * @param element The element to remove from the array. * @param array The array to remove the element from. * @return A new array with the element removed, or the original array if the array did not contain the element. */ public static Object[] remove(Object element, Object[] array) { if (! contains(element, array)) return array; List<Object> l = new ArrayList<>(array.length); for (Object o2 : array) { if (! element.equals(o2)) l.add(o2); } return l.toArray(new Object[l.size()]); } }
if (isStrict() && ! contains(value, VALID_TYPES)) throw new RuntimeException( "Invalid value passed in to setType(String). Value='"+value+"', valid values="
/** * Bean property setter: <property>in</property>. * * <p> * The location of the parameter. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"query"</js> * <li><js>"header"</js> * <li><js>"path"</js> * <li><js>"formData"</js> * <li><js>"body"</js> * </ul> * <br>Property value is required. * @return This object (for method chaining). */ public ParameterInfo setIn(String value) { if (isStrict() && ! contains(value, VALID_IN)) throw new FormattedRuntimeException( "Invalid value passed in to setIn(String). Value=''{0}'', valid values={1}", value, VALID_IN ); in = value; if ("path".equals(value)) required = true; return this; }
/** * Bean property setter: <property>in</property>. * * <p> * The location of the parameter. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"query"</js> * <li><js>"header"</js> * <li><js>"path"</js> * <li><js>"formData"</js> * <li><js>"body"</js> * </ul> * <br>Property value is required. * @return This object (for method chaining). */ public ParameterInfo setIn(String value) { if (isStrict() && ! contains(value, VALID_IN)) throw new FormattedRuntimeException( "Invalid value passed in to setIn(String). Value=''{0}'', valid values={1}", value, VALID_IN ); in = value; if ("path".equals(value)) required = true; return this; }
if (isStrict() && ! contains(value, VALID_TYPES)) throw new RuntimeException( "Invalid value passed in to setType(String). Value='"+value+"', valid values="
/** * Bean property setter: <property>type</property>. * * <p> * The type of the security scheme. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"basic"</js> * <li><js>"apiKey"</js> * <li><js>"oauth2"</js> * </ul> * <br>Property value is required. * @return This object (for method chaining). */ public SecurityScheme setType(String value) { if (isStrict() && ! contains(value, VALID_TYPES)) throw new FormattedRuntimeException( "Invalid value passed in to setType(String). Value=''{0}'', valid values={1}", value, VALID_TYPES ); type = value; return this; }
/** * Bean property setter: <property>type</property>. * * <p> * The type of the security scheme. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"basic"</js> * <li><js>"apiKey"</js> * <li><js>"oauth2"</js> * </ul> * <br>Property value is required. * @return This object (for method chaining). */ public SecurityScheme setType(String value) { if (isStrict() && ! contains(value, VALID_TYPES)) throw new FormattedRuntimeException( "Invalid value passed in to setType(String). Value=''{0}'', valid values={1}", value, VALID_TYPES ); type = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * @return This object (for method chaining). */ public HeaderInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>type</property>. * * <p> * The type of the security scheme. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"basic"</js> * <li><js>"apiKey"</js> * <li><js>"oauth2"</js> * </ul> * <br>Property value is required. * @return This object (for method chaining). */ public SecurityScheme setType(String value) { if (isStrict() && ! contains(value, VALID_TYPES)) throw new FormattedRuntimeException( "Invalid value passed in to setType(String). Value=''{0}'', valid values={1}", value, VALID_TYPES ); type = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * @return This object (for method chaining). */ public HeaderInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Items setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * @return This object (for method chaining). */ public HeaderInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Items setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public Items setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * <li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single * instance <code>foo=bar&foo=baz</code>. * <br>This is valid only for parameters <code>in</code> <js>"query"</js> or <js>"formData"</js>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public ParameterInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * <li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single * instance <code>foo=bar&foo=baz</code>. * <br>This is valid only for parameters <code>in</code> <js>"query"</js> or <js>"formData"</js>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public ParameterInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
/** * Bean property setter: <property>collectionFormat</property>. * * <p> * Determines the format of the array if type array is used. * * @param value * The new value for this property. * <br>Valid values: * <ul> * <li><js>"csv"</js> (default) - comma separated values <code>foo,bar</code>. * <li><js>"ssv"</js> - space separated values <code>foo bar</code>. * <li><js>"tsv"</js> - tab separated values <code>foo\tbar</code>. * <li><js>"pipes"</js> - pipe separated values <code>foo|bar</code>. * <li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single * instance <code>foo=bar&foo=baz</code>. * <br>This is valid only for parameters <code>in</code> <js>"query"</js> or <js>"formData"</js>. * </ul> * <br>Can be <jk>null</jk> to unset the property. * @return This object (for method chaining). */ public ParameterInfo setCollectionFormat(String value) { if (isStrict() && ! contains(value, VALID_COLLECTION_FORMATS)) throw new FormattedRuntimeException( "Invalid value passed in to setCollectionFormat(String). Value=''{0}'', valid values={1}", value, VALID_COLLECTION_FORMATS ); collectionFormat = value; return this; }
if (isStrict() && ! contains(value, VALID_TYPES)) throw new FormattedRuntimeException( "Invalid value passed in to setType(String). Value=''{0}'', valid values={1}",