@Test public void testAllMinusOne() { assertTrue(allMinusOne()); assertTrue(allMinusOne(-1)); assertTrue(allMinusOne(-1,-1)); assertFalse(allMinusOne(-1,0)); assertFalse(allMinusOne(0)); }
@Test public void testAllMinusOneLongs() { assertTrue(allMinusOne(-1l)); assertTrue(allMinusOne(-1l,-1l)); assertFalse(allMinusOne(-1l,0l)); assertFalse(allMinusOne(0l)); } }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(org.apache.juneau.jsonschema.annotation.SubItems a) { if (a == null) return true; return allEmpty(a.value(), a._default(), a._enum(), a.items()) && allEmpty(a.type(), a.format(), a.collectionFormat(), a.pattern(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(org.apache.juneau.jsonschema.annotation.SubItems a) { if (a == null) return true; return allEmpty(a.value(), a._default(), a._enum(), a.items()) && allEmpty(a.type(), a.format(), a.collectionFormat(), a.pattern(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(org.apache.juneau.jsonschema.annotation.SubItems a) { if (a == null) return true; return allEmpty(a.value(), a._default(), a._enum(), a.items()) && allEmpty(a.type(), a.format(), a.collectionFormat(), a.pattern(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Path a) { if (a == null) return true; return allEmpty(a.description(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(org.apache.juneau.jsonschema.annotation.Items a) { if (a == null) return true; return allEmpty(a.value(), a._default(), a._enum()) && allEmpty(a.type(), a.format(), a.collectionFormat(), a.pattern(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(org.apache.juneau.jsonschema.annotation.Items a) { if (a == null) return true; return allEmpty(a.value(), a._default(), a._enum()) && allEmpty(a.type(), a.format(), a.collectionFormat(), a.pattern(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(ResponseHeader a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.collectionFormat(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Query a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(ResponseHeader a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.collectionFormat(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(ResponseHeader a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.collectionFormat(), a.$ref(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Query a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Query a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(FormData a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(FormData a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(FormData a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }