Package net.sf.gridarta.model.io
Class AttributeListUtils
- java.lang.Object
-
- net.sf.gridarta.model.io.AttributeListUtils
-
public class AttributeListUtils extends java.lang.ObjectUtility class for archetype attribute related functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.lang.StringdiffArchTextKeys(@NotNull BaseObject<?,?,?,?> gameObject, @NotNull BaseObject<?,?,?,?> archetype)Returns all attributes from the given game object that don't exist in an archetype.static @NotNull java.lang.StringdiffArchTextValues(@NotNull BaseObject<?,?,?,?> archetype, @NotNull java.lang.CharSequence attributes)Returns all entries from the given attributes that don't exist in an archetype.static java.lang.StringremoveAttribute(@NotNull java.lang.String attributeList, @NotNull java.lang.String key)Removes an attribute from an attribute list.
-
-
-
Method Detail
-
removeAttribute
public static java.lang.String removeAttribute(@NotNull @NotNull java.lang.String attributeList, @NotNull @NotNull java.lang.String key)Removes an attribute from an attribute list.- Parameters:
attributeList- the attribute list to modifykey- the attribute key to remove- Returns:
- the attribute list with the given key removed
-
diffArchTextKeys
@NotNull public static @NotNull java.lang.String diffArchTextKeys(@NotNull @NotNull BaseObject<?,?,?,?> gameObject, @NotNull @NotNull BaseObject<?,?,?,?> archetype)Returns all attributes from the given game object that don't exist in an archetype. Ignores the values; compares only keys.- Parameters:
gameObject- the game objectarchetype- the archetype- Returns:
- all attributes from the archetype that don't occur in the game object
-
diffArchTextValues
@NotNull public static @NotNull java.lang.String diffArchTextValues(@NotNull @NotNull BaseObject<?,?,?,?> archetype, @NotNull @NotNull java.lang.CharSequence attributes)Returns all entries from the given attributes that don't exist in an archetype.- Parameters:
attributes- the attributesarchetype- the game object- Returns:
- all lines from
attributesthat don't occur in this game object
-
-