Class CardConverter

java.lang.Object
cz.matfyz.rudad.joker.calculator.CardConverter
All Implemented Interfaces:
picocli.CommandLine.ITypeConverter<Card>

class CardConverter extends Object implements picocli.CommandLine.ITypeConverter<Card>
A custom converter for converting a String representation of a card to a Card object.
  • Constructor Details

    • CardConverter

      CardConverter()
  • Method Details

    • convert

      public Card convert(String value) throws Exception
      Converts the provided String value to a Card object.
      Specified by:
      convert in interface picocli.CommandLine.ITypeConverter<Card>
      Parameters:
      value - the String representation of the card
      Returns:
      the Card object
      Throws:
      Exception - if an error occurs during the conversion