java.lang.Object
com.aoapps.taglib.ImmutableGlobalAttributes
- All Implemented Interfaces:
GlobalAttributes
Thread-safe, unmodifiable
GlobalAttributes instances.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetClazz()Getter required.getData()Gets the HTML data attributes or an empty map when there are none.getDir()getId()getStyle()static ImmutableGlobalAttributesof(GlobalAttributes global) Gets an immutable, thread-safe instance, returningEMPTYwhen has no attributes.static ImmutableGlobalAttributesGets an immutable, thread-safe instance, returningEMPTYwhen has no attributes.
-
Field Details
-
EMPTY
-
-
Method Details
-
of
public static ImmutableGlobalAttributes of(String id, Object clazz, Map<String, Object> data, String dir, Object style) Gets an immutable, thread-safe instance, returningEMPTYwhen has no attributes.To future-proof code, prefer using
MutableGlobalAttributesin a builder pattern. However, if maximum code efficiency is desired, this method is available.- Returns:
- The instance or
EMPTYwhen empty.
-
of
Gets an immutable, thread-safe instance, returningEMPTYwhen has no attributes.- Returns:
- The instance or
EMPTYwhen empty.
-
getId
- Specified by:
getIdin interfaceGlobalAttributes
-
getClazz
Description copied from interface:GlobalAttributesGetter required. Because without it, we get the exception:Unable to find setter method for attribute: class
- Specified by:
getClazzin interfaceGlobalAttributes
-
getData
Description copied from interface:GlobalAttributesGets the HTML data attributes or an empty map when there are none.- Specified by:
getDatain interfaceGlobalAttributes
-
getDir
- Specified by:
getDirin interfaceGlobalAttributes
-
getStyle
- Specified by:
getStylein interfaceGlobalAttributes
-
