Skip to content

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

Record EnumConstraint

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

All Implemented Interfaces:
    SchemaConstraint


public final record EnumConstraint
extends Record

Constructor Summary

Constructor Description
EnumConstraint(List<String> options)

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 List<String> options() Returns the value of the options 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.


options

public List<String> options()

Returns the value of the options record component.