Interface IntConstraint

All Superinterfaces:
Constraint<Integer>

public interface IntConstraint extends Constraint<Integer>
Represents a Constraint of the Integer type.
Since:
1.0.0.0
Author:
creatorfromhell
  • Method Summary

    Modifier and Type
    Method
    Description
    default Integer
    convert(String value)
    Used to convert the provided input into the specified object.
    default boolean
    Used to validate that the provided input is of the valid type.

    Methods inherited from interface net.tnemc.menu.core.constraints.Constraint

    asString, defaultValue, identifier
  • Method Details

    • convert

      default Integer convert(String value)
      Description copied from interface: Constraint
      Used to convert the provided input into the specified object.
      Specified by:
      convert in interface Constraint<Integer>
      Parameters:
      value - The string to convert into the object.
      Returns:
      An optional containing the converted value, or an empty optional if the provided input can't be converted into the specified object.
    • validate

      default boolean validate(String value)
      Description copied from interface: Constraint
      Used to validate that the provided input is of the valid type.
      Specified by:
      validate in interface Constraint<Integer>
      Parameters:
      value - The input to validate.
      Returns:
      True if the input is of the type associated with this constraint, otherwise false.