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