Class FactoryData

java.lang.Object
edu.ie3.datamodel.io.factory.FactoryData
Direct Known Subclasses:
EntityData, SimpleFactoryData, TimeBasedValueData

public abstract class FactoryData extends Object
  • Constructor Details

  • Method Details

    • getFieldsToValues

      public Map<String,String> getFieldsToValues()
    • getTargetClass

      public Class<?> getTargetClass()
    • containsKey

      public boolean containsKey(String key)
      Checks whether attribute map contains a value for given key
      Parameters:
      key - key to check for
      Returns:
      whether attribute map contains given field or not
    • getField

      public String getField(String field)
      Returns field value for given field name. Throws FactoryException if field does not exist.
      Parameters:
      field - field name
      Returns:
      field value
    • getFieldOptional

      public Optional<String> getFieldOptional(String field)
      Returns field value for given field name, or empty Optional if field does not exist.
      Parameters:
      field - field name
      Returns:
      field value
    • getQuantity

      public <Q extends javax.measure.Quantity<Q>> tech.units.indriya.ComparableQuantity<Q> getQuantity(String field, javax.measure.Unit<Q> unit)
      Parses and returns a Quantity from field value of given field name. Throws FactoryException if field does not exist or parsing fails.
      Type Parameters:
      Q - unit type parameter
      Parameters:
      field - field name
      unit - unit of Quantity
      Returns:
      Quantity of given field with given unit
    • getInt

      public int getInt(String field)
      Returns int value for given field name. Throws FactoryException if field does not exist or parsing fails.
      Parameters:
      field - field name
      Returns:
      int value
    • getDouble

      public double getDouble(String field)
      Returns double value for given field name. Throws FactoryException if field does not exist or parsing fails.
      Parameters:
      field - field name
      Returns:
      double value
    • getUUID

      public UUID getUUID(String field)
      Parses and returns a UUID from field value of given field name. Throws FactoryException if field does not exist or parsing fails.
      Parameters:
      field - field name
      Returns:
      UUID
    • getUUIDs

      public UUID[] getUUIDs(String field)
      Parses and returns an array of UUIDs from field value of given field name. Throws FactoryException if field does not exist or parsing fails.
      Parameters:
      field - field name
      Returns:
      UUID
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object