Interface Zeroable

All Known Subinterfaces:
Numberlike

public interface Zeroable
An object implementing this interface is marked as having custom logic to determine whether it is zero-like for the purpose of the '[' or ']' operators. When these operators are used while pointing towards an instance, isZero() is called. Zeroable objects can also be unboxed into booleans.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Called when the '[' or ']' operators are used while pointing towards the instance, or when the instance is unboxed into a boolean value.
  • Method Details

    • isZero

      boolean isZero()
      Called when the '[' or ']' operators are used while pointing towards the instance, or when the instance is unboxed into a boolean value.
      Returns:
      true if the object should be considered zero-like; false otherwise.