All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.everit.json.schema.TrueSchema Maven / Gradle / Ivy

Go to download

Implementation of the JSON Schema Core Draft v4 specification built with the org.json API

There is a newer version: 1.14.4
Show newest version
package org.everit.json.schema;

import org.everit.json.schema.internal.JSONPrinter;

/**
 * @author erosb
 */
public class TrueSchema extends EmptySchema {

    public static class Builder extends EmptySchema.Builder {

        @Override public TrueSchema build() {
            return new TrueSchema(this);
        }
    }

    public static Builder builder() {
        return new Builder();
    }

    public TrueSchema(Builder builder) {
        super(builder);
    }

    @Override
    public void describeTo(JSONPrinter writer) {
        writer.value(true);
    }

    @Override
    public String toString() {
        return "true";
    }

    @Override public boolean equals(Object o) {
        return o instanceof TrueSchema && super.equals(o);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy