Class BooleanIntegerAdapter

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<Integer,Boolean>
de.gurkenlabs.litiengine.environment.tilemap.xml.BooleanIntegerAdapter

public class BooleanIntegerAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<Integer,Boolean>
Adapter class for converting between Boolean objects and their Integer representations in XML using JAXB.
  • Constructor Details

    • BooleanIntegerAdapter

      public BooleanIntegerAdapter()
  • Method Details

    • unmarshal

      public Boolean unmarshal(Integer s)
      Converts an Integer value to a Boolean object.
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<Integer,Boolean>
      Parameters:
      s - the Integer value to be converted
      Returns:
      the corresponding Boolean object, or null if the input is null
    • marshal

      public Integer marshal(Boolean c)
      Converts a Boolean object to its Integer representation.
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<Integer,Boolean>
      Parameters:
      c - the Boolean object to be converted
      Returns:
      the corresponding Integer representation, or null if the input is null