java.lang.Object
com.aoapps.taglib.ImmutableGlobalAttributes
- All Implemented Interfaces:
GlobalAttributes
Thread-safe, unmodifiable
GlobalAttributes
instances.-
Field Summary
-
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 ImmutableGlobalAttributes
of
(GlobalAttributes global) Gets an immutable, thread-safe instance, returningEMPTY
when has no attributes.static ImmutableGlobalAttributes
Gets an immutable, thread-safe instance, returningEMPTY
when 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, returningEMPTY
when has no attributes.To future-proof code, prefer using
MutableGlobalAttributes
in a builder pattern. However, if maximum code efficiency is desired, this method is available.- Returns:
- The instance or
EMPTY
when empty.
-
of
Gets an immutable, thread-safe instance, returningEMPTY
when has no attributes.- Returns:
- The instance or
EMPTY
when empty.
-
getId
- Specified by:
getId
in interfaceGlobalAttributes
-
getClazz
Description copied from interface:GlobalAttributes
Getter required. Because without it, we get the exception:Unable to find setter method for attribute: class
- Specified by:
getClazz
in interfaceGlobalAttributes
-
getData
Description copied from interface:GlobalAttributes
Gets the HTML data attributes or an empty map when there are none.- Specified by:
getData
in interfaceGlobalAttributes
-
getDir
- Specified by:
getDir
in interfaceGlobalAttributes
-
getStyle
- Specified by:
getStyle
in interfaceGlobalAttributes
-