Skip to content

Package io.github.qishr.cascara.schema.constraint

Record RangeConstraint

java.lang.Object
        java.lang.Record
                io.github.qishr.cascara.schema.constraint.RangeConstraint

All Implemented Interfaces:
    SchemaConstraint


public final record RangeConstraint
extends Record

Constructor Summary

Constructor Description
RangeConstraint(Double min, Double max)

Method Summary

Modifier and Type Method Description
public boolean validate(Object value) Returns the value of the validate record component.
public final String toString() Returns a string representation of this record class.
public final int hashCode() Returns a hash code value for this object.
public final boolean equals(Object o) Indicates whether some other object is "equal to" this one.
public Double min() Returns the value of the min record component.
public Double max() Returns the value of the max record component.

Method Details

validate

public boolean validate(Object value)

Returns the value of the validate record component.

Specified By:

SchemaConstraint


toString

public final String toString()

Returns a string representation of this record class.


hashCode

public final int hashCode()

Returns a hash code value for this object.


equals

public final boolean equals(Object o)

Indicates whether some other object is "equal to" this one.


min

public Double min()

Returns the value of the min record component.


max

public Double max()

Returns the value of the max record component.