public NullSchema nullSchema() { return new NullSchema(); }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (!(obj instanceof NullSchema)) return false; return _equals((NullSchema) obj); } }
public NullSchema nullSchema() { return new NullSchema(); }
@Override public boolean equals(Object obj) { if (obj == this) return true; if (obj == null) return false; if (!(obj instanceof NullSchema)) return false; return _equals((NullSchema) obj); } }
/** * Create a schema which verifies only that an object is of the given format. * @param format the format to expect * @return the schema verifying the given format */ public static JsonSchema minimalForFormat(JsonFormatTypes format) { if (format != null) { switch (format) { case ARRAY: return new ArraySchema(); case OBJECT: return new ObjectSchema(); case BOOLEAN: return new BooleanSchema(); case INTEGER: return new IntegerSchema(); case NUMBER: return new NumberSchema(); case STRING: return new StringSchema(); case NULL: return new NullSchema(); case ANY: default: } } return new AnySchema(); }
/** * Create a schema which verifies only that an object is of the given format. * @param format the format to expect * @return the schema verifying the given format */ public static JsonSchema minimalForFormat(JsonFormatTypes format) { if (format != null) { switch (format) { case ARRAY: return new ArraySchema(); case OBJECT: return new ObjectSchema(); case BOOLEAN: return new BooleanSchema(); case INTEGER: return new IntegerSchema(); case NUMBER: return new NumberSchema(); case STRING: return new StringSchema(); case NULL: return new NullSchema(); case ANY: default: } } return new AnySchema(); }