Module watamebot

Interface PropertyMapping

All Known Implementing Classes:
net.foxgenesis.property.lck.impl.BlobMapping, PluginPropertyMapping

public interface PropertyMapping
Interface defining method of parsing a property value into a usable data type.
Author:
Ashley
  • Method Details

    • getAsPlainText

      String getAsPlainText()
      Parse this property as plain text.
      Returns:
      Returns the property value as it is inside the configuration
    • getAsObject

      Object getAsObject()
      Parse this property value as a serialized object.
      Returns:
      Returns the serialized object
    • getAsString

      String getAsString()
      Parse this property value as a string of text.
      Returns:
      Returns the value as a string
    • getAsBoolean

      boolean getAsBoolean()
      Parse this property value as a boolean.
      Returns:
      Returns the parsed boolean
    • getAsInt

      int getAsInt()
      Parse this property value as an integer.
      Returns:
      Returns the parsed integer
    • getAsFloat

      float getAsFloat()
      Parse this property value as a float.
      Returns:
      Returns the parsed float
    • getAsDouble

      double getAsDouble()
      Parse this property value as a double.
      Returns:
      Returns the parsed double.
    • getAsLong

      long getAsLong()
      Parse this property value as a long.
      Returns:
      Returns the parsed long.
    • getAsStringArray

      String[] getAsStringArray()
      Parse this property value as an array of strings.
      Returns:
      Returns the parsed string array
    • getAsBooleanArray

      boolean[] getAsBooleanArray()
      Parse this property value as an array of booleans.
      Returns:
      Returns the parsed boolean array
    • getAsByteArray

      byte[] getAsByteArray()
      Parse this property value as an array of bytes.
      Returns:
      Returns the parsed byte array
    • getAsIntegerArray

      int[] getAsIntegerArray()
      Parse this property value as an array of integers.
      Returns:
      Returns the parsed integer array
    • getAsFloatArray

      float[] getAsFloatArray()
      Parse this property value as an array of floats.
      Returns:
      Returns the parsed float array
    • getAsDoubleArray

      double[] getAsDoubleArray()
      Parse this property value as an array of doubles.
      Returns:
      Returns the parsed double array
    • getAsLongArray

      long[] getAsLongArray()
      Parse this property value as an array of longs.
      Returns:
      Returns the parsed long array
    • getType

      PropertyType getType()
      Get storage type of this property.
      Returns:
      Returns a PropertyType that defines how a property should be stored inside the configuration
    • getLength

      long getLength()
      Get the size of this property value.
      Returns:
      Returns a long representing how large this property is
    • isUserReadable

      default boolean isUserReadable()
      Check if this property can be displayed in a user readable format.
      Returns:
      Returns true if this property can be displayed to the user. false otherwise.
    • isPlainText

      default boolean isPlainText()
      Check if this property is stored as plain text.
      Returns:
      Returns true if this property is stored without any additional modifications to it
    • unjoinByte

      static byte[] unjoinByte(String text)
    • unjoinBoolean

      static boolean[] unjoinBoolean(String text)
    • unjoinInt

      static int[] unjoinInt(String text)
    • unjoinFloat

      static float[] unjoinFloat(String text)
    • unjoinDouble

      static double[] unjoinDouble(String text)
    • unjoinLong

      static long[] unjoinLong(String text)
    • unjoin

      static <U> U[] unjoin(String text, Function<String,U> mapper, IntFunction<U[]> construct)
    • parse

      static <U> U parse(Class<U> returnType, byte[] data) throws PropertyException
      Throws:
      PropertyException