Interface Attributes

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getAttributeDouble​(@NotNull java.lang.String attributeName)
      Returns an attribute value of this Archetype as double.
      int getAttributeInt​(@NotNull java.lang.String attributeName)
      Returns an attribute value of this Archetype as int.
      long getAttributeLong​(@NotNull java.lang.String attributeName)
      Returns an attribute value of this Archetype as long.
      @NotNull java.lang.String getAttributeString​(@NotNull java.lang.String attributeName)
      Returns the requested attribute value of this GameObject as String.
      boolean hasAttribute​(@NotNull java.lang.String attributeName)
      Returns whether an attribute name exists.
      void removeAttribute​(@NotNull java.lang.String attributeName)
      Removes the String of an archetype attribute from the objectText.
      void setAttributeInt​(@NotNull java.lang.String attributeName, int value)
      Sets an int value attribute.
    • Method Detail

      • hasAttribute

        boolean hasAttribute​(@NotNull
                             @NotNull java.lang.String attributeName)
        Returns whether an attribute name exists.
        Parameters:
        attributeName - the attribute name
        Returns:
        whether the attribute name exists
      • getAttributeString

        @NotNull
        @NotNull java.lang.String getAttributeString​(@NotNull
                                                     @NotNull java.lang.String attributeName)
        Returns the requested attribute value of this GameObject as String. The attribute value is first searched in this GameObject. If the attribute value is not found and this GameObject is not an Archetype itself, the attribute value is searched in this GameObject's Archetype as well.
        Parameters:
        attributeName - the name of the attribute to search
        Returns:
        the attribute value or an empty String ("") if no such attribute
      • getAttributeInt

        int getAttributeInt​(@NotNull
                            @NotNull java.lang.String attributeName)
        Returns an attribute value of this Archetype as int.
        Parameters:
        attributeName - the name of the attribute value to return
        Returns:
        the attribute value or 0 (zero) if not found
        See Also:
        getAttributeString(String)
      • getAttributeLong

        long getAttributeLong​(@NotNull
                              @NotNull java.lang.String attributeName)
        Returns an attribute value of this Archetype as long.
        Parameters:
        attributeName - the name of the attribute value to return
        Returns:
        the attribute value or 0 (zero) if not found
        See Also:
        getAttributeString(String)
      • getAttributeDouble

        double getAttributeDouble​(@NotNull
                                  @NotNull java.lang.String attributeName)
        Returns an attribute value of this Archetype as double.
        Parameters:
        attributeName - the name of the attribute value to return
        Returns:
        the attribute value or 0.0 (zero) if not found
        See Also:
        getAttributeString(String)
      • setAttributeInt

        void setAttributeInt​(@NotNull
                             @NotNull java.lang.String attributeName,
                             int value)
        Sets an int value attribute.
        Parameters:
        attributeName - the name of the attribute to update
        value - the new value
      • removeAttribute

        void removeAttribute​(@NotNull
                             @NotNull java.lang.String attributeName)
        Removes the String of an archetype attribute from the objectText.
        Parameters:
        attributeName - search for "attributeName <string>"