Class DecimalFloatAdapter

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Float>
de.gurkenlabs.litiengine.environment.tilemap.xml.DecimalFloatAdapter

public class DecimalFloatAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Float>
This adapter implementation ensures that the float value is serialized like an integer when it has no digits behind the decimal point.
  • Constructor Summary

    Constructors 
    ConstructorDescription
    DecimalFloatAdapter() 
  • Method Summary

    Modifier and TypeMethodDescription
    java.lang.Stringmarshal​(java.lang.Float v) 
    java.lang.Floatunmarshal​(java.lang.String v) 

    Methods inherited from class java.lang.Object

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

  • Method Details

    • unmarshal

      public java.lang.Float unmarshal​(java.lang.String v) throws java.lang.Exception
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Float>
      Throws:
      java.lang.Exception
    • marshal

      public java.lang.String marshal​(java.lang.Float v) throws java.lang.Exception
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.Float>
      Throws:
      java.lang.Exception