Class IntConverter

java.lang.Object
com.github.alex1304.ultimategdbot.api.command.annotated.paramconverter.IntConverter
All Implemented Interfaces:
ParamConverter<java.lang.Integer>

public class IntConverter
extends java.lang.Object
implements ParamConverter<java.lang.Integer>
  • Constructor Summary

    Constructors 
    Constructor Description
    IntConverter()  
  • Method Summary

    Modifier and Type Method Description
    reactor.core.publisher.Mono<java.lang.Integer> convert​(Context ctx, java.lang.String input)
    Accepts a String input and parses it into an object of type T.
    java.lang.Class<java.lang.Integer> type()
    Returns the type of object resulting of the parsing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • convert

      public reactor.core.publisher.Mono<java.lang.Integer> convert​(Context ctx, java.lang.String input)
      Description copied from interface: ParamConverter
      Accepts a String input and parses it into an object of type T. This method has asynchronous capabilities, and may error to indicate that it cannot be parsed to the desired object. An empty mono may represent the fact that an argument is optional, ignored or non applicable.
      Specified by:
      convert in interface ParamConverter<java.lang.Integer>
      Parameters:
      ctx - the context of a command that may influence the parsing process
      input - the input to parse
      Returns:
      a Mono emittng the result of the parsing, a error if the parsing fails, or empty if non applicable or not provided.
    • type

      public java.lang.Class<java.lang.Integer> type()
      Description copied from interface: ParamConverter
      Returns the type of object resulting of the parsing.
      Specified by:
      type in interface ParamConverter<java.lang.Integer>
      Returns:
      a Class