com.beans.BooleanProperty Maven / Gradle / Ivy
package com.beans;
import java.util.function.BooleanSupplier;
/**
*
* A boolean specialization of {@link Property}.
* Provides methods to access using primitive types: {@link #getAsBoolean()}, {@link #setAsBoolean(boolean)}.
*
*
* An extension of {@link BooleanSupplier}.
*
*
* This property is not nullable.
*
*
* @since JavaBeans 1.0
*/
public interface BooleanProperty extends BooleanSupplier, Property {
/**
* Gets the value of the property.
*
* @return the value of the property.
*/
@Override
boolean getAsBoolean();
/**
* Sets the value of the property.
*
* @param value value of the property.
*/
void setAsBoolean(boolean value);
/**
* {@inheritDoc}
*
* Setting null is not valid, and will set false instead.
*
*/
@Override
void set(Boolean value);
}