class AllOf
        extends JSONSchema {
    final JSONSchema[] items;

    public AllOf(JSONSchema[] items) {
        super(null, null);
        this.items = items;
    }

    public AllOf(JSONObject input, JSONSchema parent) {
        super(input);
        JSONArray items = input.getJSONArray("allOf");
        if (items == null || items.isEmpty()) {
            throw new JSONException("allOf not found");
        }

        this.items = new JSONSchema[items.size()];
        Type type = null;
        for (int i = 0; i < this.items.length; i++) {
            JSONSchema itemSchema = null;

            Object item = items.get(i);
            if (item instanceof Boolean) {
                itemSchema = (Boolean) item ? Any.INSTANCE : Any.NOT_ANY;
            } else {
                JSONObject itemObject = (JSONObject) item;
                if (!itemObject.containsKey("type") && type != null) {
                    switch (type) {
                        case String:
                            itemSchema = new StringSchema(itemObject);
                            break;
                        case Integer:
                            itemSchema = new IntegerSchema(itemObject);
                            break;
                        case Number:
                            itemSchema = new NumberSchema(itemObject);
                            break;
                        case Boolean:
                            itemSchema = new BooleanSchema(itemObject);
                            break;
                        case Array:
                            itemSchema = new ArraySchema(itemObject, null);
                            break;
                        case Object:
                            itemSchema = new ObjectSchema(itemObject);
                            break;
                        default:
                            break;
                    }
                }
                if (itemSchema == null) {
                    itemSchema = JSONSchema.of(itemObject, parent);
                }
            }

            type = itemSchema.getType();
            this.items[i] = itemSchema;
        }
    }

    @Override
    public Type getType() {
        return Type.AllOf;
    }

    @Override
    public ValidateResult validate(Object value) {<FILL_FUNCTION_BODY>}
}

        for (JSONSchema item : items) {
            ValidateResult result = item.validate(value);
            if (!result.isSuccess()) {
                return result;
            }
        }
        return SUCCESS;
    
<methods>public void accept(Predicate<com.alibaba.fastjson2.schema.JSONSchema>) ,public void assertValidate(java.lang.Object) ,public void assertValidate(java.lang.Integer) ,public void assertValidate(java.lang.Long) ,public void assertValidate(java.lang.Double) ,public void assertValidate(java.lang.Float) ,public void assertValidate(long) ,public void assertValidate(double) ,public boolean equals(java.lang.Object) ,public java.lang.String getDescription() ,public java.lang.String getTitle() ,public abstract com.alibaba.fastjson2.schema.JSONSchema.Type getType() ,public int hashCode() ,public boolean isValid(java.lang.Object) ,public boolean isValid(long) ,public boolean isValid(double) ,public boolean isValid(java.lang.Double) ,public boolean isValid(float) ,public boolean isValid(java.lang.Float) ,public boolean isValid(java.lang.Integer) ,public boolean isValid(java.lang.Long) ,public static com.alibaba.fastjson2.schema.JSONSchema of(com.alibaba.fastjson2.JSONObject, Class#RAW) ,public static com.alibaba.fastjson2.schema.JSONSchema of(com.alibaba.fastjson2.JSONObject) ,public static com.alibaba.fastjson2.schema.JSONSchema of(java.lang.reflect.Type) ,public static com.alibaba.fastjson2.schema.JSONSchema of(com.alibaba.fastjson2.JSONObject, com.alibaba.fastjson2.schema.JSONSchema) ,public static com.alibaba.fastjson2.schema.JSONSchema ofValue(java.lang.Object) ,public static com.alibaba.fastjson2.schema.JSONSchema parseSchema(java.lang.String) ,public com.alibaba.fastjson2.JSONObject toJSONObject() ,public java.lang.String toString() ,public abstract com.alibaba.fastjson2.schema.ValidateResult validate(java.lang.Object) ,public com.alibaba.fastjson2.schema.ValidateResult validate(long) ,public com.alibaba.fastjson2.schema.ValidateResult validate(double) ,public com.alibaba.fastjson2.schema.ValidateResult validate(java.lang.Float) ,public com.alibaba.fastjson2.schema.ValidateResult validate(java.lang.Double) ,public com.alibaba.fastjson2.schema.ValidateResult validate(java.lang.Integer) ,public com.alibaba.fastjson2.schema.ValidateResult validate(java.lang.Long) <variables>static final Map<java.lang.String,com.alibaba.fastjson2.schema.JSONSchema> CACHE,static final com.alibaba.fastjson2.schema.ValidateResult CONTAINS_NOT_MATCH,static final com.alibaba.fastjson2.JSONReader.Context CONTEXT,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_ANY_OF,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_INPUT_NOT_ENCODED,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_INPUT_NULL,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_NOT,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_ONE_OF,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_PROPERTY_NAME,static final com.alibaba.fastjson2.schema.ValidateResult FAIL_TYPE_NOT_MATCH,static final com.alibaba.fastjson2.schema.ValidateResult REQUIRED_NOT_MATCH,static final com.alibaba.fastjson2.schema.ValidateResult SUCCESS,static final com.alibaba.fastjson2.schema.ValidateResult UNIQUE_ITEMS_NOT_MATCH,final non-sealed java.lang.String description,final non-sealed java.lang.String title