Class BaseRequirement<V>

    • Constructor Detail

      • BaseRequirement

        protected BaseRequirement​(RequirementBuilder.Input input)
        Create a new requirement
        Parameters:
        input - the input
    • Method Detail

      • handleValue

        protected Object handleValue​(Object inputValue)
        Get the value from the input value
        Parameters:
        inputValue - the input value
        Returns:
        the value
      • convert

        protected abstract V convert​(Object value,
                                     UUID uuid)
        Convert the raw value to the final value
        Parameters:
        value - the raw value
        Returns:
        the final value
      • checkConverted

        protected abstract Requirement.Result checkConverted​(UUID uuid,
                                                             V value)
        Check the requirement for the unique id with the converted value
        Parameters:
        uuid - the unique id
        value - the converted value
        Returns:
        the result
      • getFinalValue

        public final V getFinalValue​(UUID uuid)
        Get the final value
        Parameters:
        uuid - the unique id
        Returns:
        the final value
      • getMenu

        public Menu getMenu()
        Description copied from interface: MenuElement
        Get the menu containing the element
        Specified by:
        getMenu in interface MenuElement
        Returns:
        the menu
      • getName

        public String getName()
        Description copied from interface: Requirement
        Get the name of the requirement
        Specified by:
        getName in interface Requirement
        Returns:
        the name