Class Prefs.Restore

  • Enclosing class:
    Prefs

    public static class Prefs.Restore
    extends java.lang.Object
    Static class sued to load data.
    • Constructor Summary

      Constructors 
      Constructor Description
      Restore()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void close()
      Called after all other restore methods.
      static java.lang.Float[] getArray​(java.lang.String key)
      Restore a Float array.
      static BoatType getBoatType​(java.lang.String key)
      Restore BoatType
      static float getFloat​(java.lang.String key)
      Restore a float
      static int getInteger​(java.lang.String key)
      Restore an int
      static com.badlogic.gdx.math.Vector2 getVector2​(java.lang.String key)
      Restore a Vector2.
      static void open()
      Called before any other Restore methods.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Restore

        public Restore()
    • Method Detail

      • close

        public static void close()
        Called after all other restore methods. Does nothing.
      • getInteger

        public static int getInteger​(java.lang.String key)
        Restore an int
        Parameters:
        key - key the int is stored under
        Returns:
        the restored int
      • getFloat

        public static float getFloat​(java.lang.String key)
        Restore a float
        Parameters:
        key - key the float is stored under
        Returns:
        the restored float
      • getArray

        public static java.lang.Float[] getArray​(java.lang.String key)
        Restore a Float array. Deserialized from JSON.
        Parameters:
        key - key the array is stored under.
        Returns:
        the restored array.
      • getVector2

        public static com.badlogic.gdx.math.Vector2 getVector2​(java.lang.String key)
        Restore a Vector2.
        Parameters:
        key - key the vector is stored under.
        Returns:
        the restored vector.
      • getBoatType

        public static BoatType getBoatType​(java.lang.String key)
        Restore BoatType
        Parameters:
        key - key the BoatType is stored under
        Returns:
        the restored BoatType