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

io.annot8.common.data.bounds.NoBounds Maven / Gradle / Ivy

The newest version!
/* Annot8 (annot8.io) - Licensed under Apache-2.0. */
package io.annot8.common.data.bounds;

import io.annot8.api.bounds.Bounds;
import io.annot8.api.data.Content;
import jakarta.json.bind.annotation.JsonbCreator;
import java.util.Optional;

/**
 * Implementation of Bounds indicating that an annotation does not have any bounds (i.e. it is
 * metadata).
 *
 * 

This class is a singleton, and should be accessed via getInstance() */ public final class NoBounds implements Bounds { private static final NoBounds INSTANCE = new NoBounds(); private NoBounds() { // Empty constructor } /** * Get instance * * @return the singleton instance of NoBounds */ @JsonbCreator public static NoBounds getInstance() { return INSTANCE; } @Override public String toString() { return "NoBounds"; } @Override public , R> Optional getData(C content, Class requiredClass) { return Optional.empty(); } @Override public > boolean isValid(C content) { return true; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy