Interface Converter<F,T>

Type Parameters:
F - The type to convert from.
T - The type to convert to.
All Known Implementing Classes:
EnumParser
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Converter<F,T>
Used to convert an object to a different type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A Converter flag declaring that this Converter can be any part of a chain.
    static final int
    A Converter flag declaring that this Converter cannot be a part of a chain.
    static final int
    A Converter flag declaring this Converter cannot be chained to another Converter.
    static final int
    A Converter flag declaring that another Converter cannot be chained to this Converter.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(F from)
    Converts an object using this Converter.
  • Field Details

    • ALL_CHAINING

      static final int ALL_CHAINING
      A Converter flag declaring that this Converter can be any part of a chain.
      See Also:
    • NO_LEFT_CHAINING

      static final int NO_LEFT_CHAINING
      A Converter flag declaring this Converter cannot be chained to another Converter. This means that this Converter must be the beginning of a chain.
      See Also:
    • NO_RIGHT_CHAINING

      static final int NO_RIGHT_CHAINING
      A Converter flag declaring that another Converter cannot be chained to this Converter. This means that this Converter must be the end of a chain.
      See Also:
    • NO_CHAINING

      static final int NO_CHAINING
      A Converter flag declaring that this Converter cannot be a part of a chain.
      See Also:
  • Method Details

    • convert

      @Nullable T convert(F from)
      Converts an object using this Converter.
      Parameters:
      from - The object to convert.
      Returns:
      The converted object.