Interface Emptiable

  • All Known Implementing Classes:
    Measurement­Range, Number­Range, Range

    public interface Emptiable
    Interface of classes for which empty instances may exist. This interface is typically used for filtering empty elements from a tree of objects. Some examples of emptiable classes are:
    • Range when the lower bounds is equals to the upper bounds and at least one bound is exclusive.
    • org​.apache​.sis​.metadata​.Abstract­Metadata when no property value has been given to the metadata, or all properties are themselves empty.
    • org​.apache​.sis​.geometry​.Abstract­Envelope when the span, surface or volume inside the envelope is zero.
    SIS collections do not implement this interface even if they provide a is­Empty() method, for consistency with collections in java​.util and other libraries. This policy avoid duplicated calls to is­Empty() methods when the caller needs to check for both Collection and Emptiable interfaces.
    Since:
    0.4

    Defined in the sis-utility module

    • Method Detail

      • isEmpty

        boolean isEmpty()
        Returns true if this instance is empty. The definition of "emptiness" may vary between implementations. For example org​.apache​.sis​.metadata​.iso​.extent​.Default­Geographic­Bounding­Box#is­Empty() returns true if all values are Na­N (i.e. uninitialized) while org​.apache​.sis​.geometry​.Abstract­Envelope#is­Empty() returns true if the geometric surface is zero.
        Returns:
        true if this instance is empty, or false otherwise.