Class UnitOfMeasurement

java.lang.Object
de.fraunhofer.iosb.ilt.frostclient.models.ext.UnitOfMeasurement
All Implemented Interfaces:
ComplexValue<UnitOfMeasurement>

public class UnitOfMeasurement extends Object implements ComplexValue<UnitOfMeasurement>
Model class for UnitOfMeasurement. This is a complex property in STA.
  • Field Details

  • Constructor Details

    • UnitOfMeasurement

      public UnitOfMeasurement()
    • UnitOfMeasurement

      public UnitOfMeasurement(String name, String symbol, String definition)
  • Method Details

    • getName

      public String getName()
      Returns:
      the name
    • getSymbol

      public String getSymbol()
      Returns:
      the symbol
    • getDefinition

      public String getDefinition()
      Returns:
      the definition
    • getProperty

      public <P> P getProperty(Property<P> property)
      Description copied from interface: ComplexValue
      Get the value of the given property.
      Specified by:
      getProperty in interface ComplexValue<UnitOfMeasurement>
      Type Parameters:
      P - The type of the property and value.
      Parameters:
      property - The property to get the value of.
      Returns:
      the value of the requested property.
    • setProperty

      public <P> UnitOfMeasurement setProperty(Property<P> property, P value)
      Description copied from interface: ComplexValue
      Set the given property to the given value.
      Specified by:
      setProperty in interface ComplexValue<UnitOfMeasurement>
      Type Parameters:
      P - The type of the property.
      Parameters:
      property - The property to set.
      value - The value to set the property to.
      Returns:
      this.
    • getProperty

      public Object getProperty(String name)
      Description copied from interface: ComplexValue
      Get the custom property with the given name. Only valid for ComplexTypes that are classed as openType, returns null for non-openTypes.
      Specified by:
      getProperty in interface ComplexValue<UnitOfMeasurement>
      Parameters:
      name - The name of the custom property to fetch.
      Returns:
      The value of the custom property.
    • setProperty

      public UnitOfMeasurement setProperty(String name, Object value)
      Description copied from interface: ComplexValue
      Set the custom property with the given name to the given value. Only valid for ComplexTypes that are classed as openType.
      Specified by:
      setProperty in interface ComplexValue<UnitOfMeasurement>
      Parameters:
      name - The name of the custom property to set.
      value - The value of the custom property to set.
      Returns:
      this.
    • setName

      public UnitOfMeasurement setName(String name)
      Parameters:
      name - the name to set
      Returns:
      this
    • setSymbol

      public UnitOfMeasurement setSymbol(String symbol)
      Parameters:
      symbol - the symbol to set
      Returns:
      this
    • setDefinition

      public UnitOfMeasurement setDefinition(String definition)
      Parameters:
      definition - the definition to set
      Returns:
      this
    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object