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

org.openlca.jsonld.SchemaVersion Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
package org.openlca.jsonld;

public record SchemaVersion(int value) {

	static final int FALLBACK = 1;
	public static final int CURRENT = 4;

	/**
	 * Get the current schema version that is supported by this API.
	 */
	public static SchemaVersion current() {
		return new SchemaVersion(CURRENT);
	}

	/**
	 * Get the fallback version of the schema.
	 */
	public static SchemaVersion fallback() {
		return new SchemaVersion(FALLBACK);
	}

	public boolean isCurrent() {
		return value == CURRENT;
	}

	public boolean isOlder() {
		return value < CURRENT;
	}

	public boolean isNewer() {
		return value > CURRENT;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy