Class LongFlag<F extends NumberFlag<Long,​F>>

Direct Known Subclasses:
TimeFlag

public abstract class LongFlag<F extends NumberFlag<Long,​F>> extends NumberFlag<Long,​F>
  • Constructor Details

    • LongFlag

      protected LongFlag(@NonNull Long value, Long minimum, Long maximum, @NonNull Caption flagDescription)
    • LongFlag

      protected LongFlag(@NonNull Long value, @NonNull Caption flagDescription)
  • Method Details

    • merge

      public F merge(@NonNull Long newValue)
      Description copied from class: PlotFlag
      Merge this flag's value with another value and return an instance holding the merged value.
      Specified by:
      merge in class PlotFlag<Long,​F extends NumberFlag<Long,​F>>
      Parameters:
      newValue - New flag value.
      Returns:
      Flag containing parsed flag value.
    • toString

      public String toString()
      Description copied from class: PlotFlag
      Returns a string representation of the flag instance, that when passed through PlotFlag.parse(String) will result in an equivalent instance of the flag.
      Specified by:
      toString in class PlotFlag<Long,​F extends NumberFlag<Long,​F>>
      Returns:
      String representation of the flag
    • getExample

      public String getExample()
      Description copied from class: PlotFlag
      An example of a string that would parse into a valid flag value.
      Specified by:
      getExample in class PlotFlag<Long,​F extends NumberFlag<Long,​F>>
      Returns:
      An example flag value.
    • parseNumber

      protected @NonNull Long parseNumber(String input) throws FlagParseException
      Description copied from class: NumberFlag
      Parse the raw string input to the number type.
      Specified by:
      parseNumber in class NumberFlag<Long,​F extends NumberFlag<Long,​F>>
      Parameters:
      input - the string to parse the number from.
      Returns:
      the parsed number.
      Throws:
      FlagParseException - if the number couldn't be parsed.
    • isValuedPermission

      public boolean isValuedPermission()
      Description copied from class: PlotFlag
      Get if the flag's permission should check for values. E.g. plots.flag.set.music.VALUE
      Overrides:
      isValuedPermission in class PlotFlag<Long,​F extends NumberFlag<Long,​F>>
      Returns:
      if valued permission