Class TagAttribute<T>

  • All Implemented Interfaces:
    Property<T>, Localized, java.io.Serializable, java.lang.Comparable<TagAttribute<?>>

    public class TagAttribute<T>
    extends java.lang.Object
    implements java.io.Serializable, Localized, java.lang.Comparable<TagAttribute<?>>, Property<T>
    Tag attributes are related to TagProp, but are usually more complicated data types.
    See Also:
    Serialized Form
    • Constructor Detail

      • TagAttribute

        public TagAttribute()
    • Method Detail

      • getProp

        public static TagAttribute getProp​(java.lang.String name)
        Returns the TagAttribute for the given name (Case insensitive). Returns null if there is no TagAttribute of that name.
      • shouldIntern

        public boolean shouldIntern()
        Returns whether the string value of this property should be "interned" for performance.
      • isWriteable

        public boolean isWriteable()
      • setWritable

        public void setWritable​(boolean writable)
      • getName

        public java.lang.String getName()
        Description copied from interface: Property
        The "name" of this property. Should be descriptive, but also unique. To this end, it is encouraged to make your keys fully qualified by prefixing them with your module id. For example: "mymod.MyProperty". Properties defined by the system start with "sys."
        Specified by:
        getName in interface Property<T>
      • setName

        public void setName​(java.lang.String name)
      • getType

        public java.lang.Class<? extends T> getType()
        Returns the type of the tag property. Some tag properties (notable the value property) can have variable type, in which case this will return Object
        Specified by:
        getType in interface Property<T>
      • setType

        public void setType​(java.lang.Class<? extends T> type)
      • getDefaultValue

        public T getDefaultValue()
        Returns the default value for this tag property.
        Specified by:
        getDefaultValue in interface Property<T>
      • setDefaultValue

        public void setDefaultValue​(T defaultValue)
      • fullSet

        public static java.util.Set<TagAttribute> fullSet()
      • name

        public java.lang.String name()
      • compareTo

        public int compareTo​(TagAttribute o)
        Specified by:
        compareTo in interface java.lang.Comparable<T>
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.util.Locale locale)
        Specified by:
        toString in interface Localized