Interface IHCAttrContainer

  • All Superinterfaces:
    com.helger.commons.collection.attr.IAttributeContainer<com.helger.xml.microdom.IMicroQName,​String>, com.helger.commons.lang.ICloneable<com.helger.commons.collection.impl.ICommonsMap<com.helger.xml.microdom.IMicroQName,​String>>, com.helger.commons.collection.impl.ICommonsMap<com.helger.xml.microdom.IMicroQName,​String>, com.helger.commons.traits.IGetterByKeyTrait<com.helger.xml.microdom.IMicroQName>, Map<com.helger.xml.microdom.IMicroQName,​String>

    public interface IHCAttrContainer
    extends com.helger.commons.collection.attr.IAttributeContainer<com.helger.xml.microdom.IMicroQName,​String>
    Special attribute container for HC elements
    Author:
    Philip Helger
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.helger.commons.collection.attr.IAttributeContainer

        com.helger.commons.collection.attr.IAttributeContainer.IAfterSetValueCallback<KEYTYPE extends Object,​VALUETYPE extends Object>, com.helger.commons.collection.attr.IAttributeContainer.IBeforeSetValueCallback<KEYTYPE extends Object,​VALUETYPE extends Object>
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default com.helger.commons.state.EChange addToAriaDescribedBy​(IHCElement<?> aDescribedBy)  
      default com.helger.commons.state.EChange addToAriaDescribedBy​(IHCElement<?>... aDescribedByMultiple)  
      default com.helger.commons.state.EChange addToAriaDescribedBy​(Iterable<? extends IHCElement<?>> aDescribedByMultiple)  
      default com.helger.commons.state.EChange addToAriaDescribedBy​(String sDescribedBy)  
      default boolean containsDataAttr​(String sName)
      Check if a certain data attribute is contained.
      default com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.xml.microdom.IMicroQName,​String> getAllDataAttrs()  
      default String getDataAttrValue​(String sName)
      Get the value of a certain data attribute.
      default boolean hasDataAttrs()  
      default com.helger.commons.state.EChange putIn​(String sName, String sNewValue)  
      default com.helger.commons.state.EChange removeDataAttr​(String sName)
      Remove the data attribute with the specified name.
      default com.helger.commons.state.EChange setAriaControls​(String sControls)  
      default com.helger.commons.state.EChange setAriaDescribedBy​(IHCElement<?> aDescribedBy)  
      default com.helger.commons.state.EChange setAriaDescribedBy​(IHCElement<?>... aDescribedByMultiple)  
      default com.helger.commons.state.EChange setAriaDescribedBy​(Iterable<? extends IHCElement<?>> aDescribedByMultiple)  
      default com.helger.commons.state.EChange setAriaDescribedBy​(String sDescribedBy)  
      default com.helger.commons.state.EChange setAriaExpanded​(boolean bIsExpanded)  
      default com.helger.commons.state.EChange setAriaHasPopup​(boolean bHasPopup)  
      default com.helger.commons.state.EChange setAriaHidden​(boolean bHidden)  
      default com.helger.commons.state.EChange setAriaInvalid​(boolean bInvalid)  
      default com.helger.commons.state.EChange setAriaLabel​(String sLabel)  
      default com.helger.commons.state.EChange setAriaLabeledBy​(IHCElement<?> aLabeledBy)  
      default com.helger.commons.state.EChange setAriaLabeledBy​(IHCElement<?>... aLabeledByMultiple)  
      default com.helger.commons.state.EChange setAriaLabeledBy​(Iterable<? extends IHCElement<?>> aLabeledByMultiple)  
      default com.helger.commons.state.EChange setAriaLabeledBy​(String sLabeledBy)  
      default com.helger.commons.state.EChange setAriaRequired​(boolean bIsRequired)  
      default com.helger.commons.state.EChange setDataAttr​(String sName, int nValue)
      Set a data attribute that is serialized as is.
      default com.helger.commons.state.EChange setDataAttr​(String sName, long nValue)
      Set a data attribute that is serialized as is.
      default com.helger.commons.state.EChange setDataAttr​(String sName, String sValue)
      Set a data attribute that is serialized as is.
      • Methods inherited from interface com.helger.commons.collection.attr.IAttributeContainer

        afterSetValueCallbacks, beforeSetValueCallbacks, getAsBoolean, getAsDouble, getAsFloat, getAsInt, getAsLong, getClone, getValue, putAllIn, putIn
      • Methods inherited from interface com.helger.commons.collection.impl.ICommonsMap

        addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfEntrySet, copyOfKeySet, copyOfKeySet, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, createInstance, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAll
      • Methods inherited from interface com.helger.commons.traits.IGetterByKeyTrait

        containsNonNullValue, containsNullValue, getAsBigDecimal, getAsBigDecimal, getAsBigInteger, getAsBigInteger, getAsBoolean, getAsBooleanObj, getAsByte, getAsByte, getAsByteArray, getAsByteObj, getAsChar, getAsChar, getAsCharArray, getAsCharArray, getAsCharObj, getAsDouble, getAsDoubleObj, getAsFloat, getAsFloatObj, getAsInt, getAsIntObj, getAsLocalDate, getAsLocalDate, getAsLocalDate, getAsLocalDateTime, getAsLocalDateTime, getAsLocalDateTime, getAsLocalTime, getAsLocalTime, getAsLocalTime, getAsLong, getAsLongObj, getAsShort, getAsShort, getAsShortObj, getAsSqlBlob, getAsSqlClob, getAsSqlDate, getAsSqlNClob, getAsSqlRowId, getAsSqlTime, getAsSqlTimestamp, getAsString, getAsString, getAsStringList, getAsStringList, getAsStringSet, getAsStringSet, getCastedValue, getCastedValue, getCastedValue, getCastedValue, getConvertedValue, getConvertedValue, getSafeCastedValue, getSafeCastedValue, getValueClass, hasStringValue, hasStringValue, onSafeCastError
    • Method Detail

      • hasDataAttrs

        default boolean hasDataAttrs()
        Returns:
        true if at least one data attribute is contained
      • containsDataAttr

        default boolean containsDataAttr​(@Nullable
                                         String sName)
        Check if a certain data attribute is contained. Shortcut for containsCustomAttr ("data-"+sName).
        Parameters:
        sName - The name of the data attribute to check
        Returns:
        true if such a data attribute is contained.
      • getDataAttrValue

        @Nullable
        default String getDataAttrValue​(@Nullable
                                        String sName)
        Get the value of a certain data attribute. Shortcut for getCustomAttrValue ("data-"+sName).
        Parameters:
        sName - The name of the data attribute to retrieve the value from
        Returns:
        null if no such data attribute is contained.
      • getAllDataAttrs

        @Nonnull
        @ReturnsMutableCopy
        default com.helger.commons.collection.impl.ICommonsOrderedMap<com.helger.xml.microdom.IMicroQName,​String> getAllDataAttrs()
        Returns:
        All data attributes contained. Never null.
      • setDataAttr

        @Nonnull
        default com.helger.commons.state.EChange setDataAttr​(@Nullable
                                                             String sName,
                                                             int nValue)
        Set a data attribute that is serialized as is. Shortcut for setCustomAttr ("data-"+sName, nValue).
        Parameters:
        sName - The name of the attribute. If it is null nothing happens
        nValue - The value of the attribute that is converted to a String.
        Returns:
        EChange
      • setDataAttr

        @Nonnull
        default com.helger.commons.state.EChange setDataAttr​(@Nullable
                                                             String sName,
                                                             long nValue)
        Set a data attribute that is serialized as is. Shortcut for setCustomAttr ("data-"+sName, nValue).
        Parameters:
        sName - The name of the attribute. If it is null nothing happens
        nValue - The value of the attribute that is converted to a String.
        Returns:
        EChange
      • setDataAttr

        @Nonnull
        default com.helger.commons.state.EChange setDataAttr​(@Nullable
                                                             String sName,
                                                             @Nullable
                                                             String sValue)
        Set a data attribute that is serialized as is. Shortcut for setCustomAttr ("data-"+sName, sValue).
        Parameters:
        sName - The name of the attribute. If it is null nothing happens
        sValue - The value of the attribute. If it is null nothing happens
        Returns:
        EChange
      • removeDataAttr

        @Nonnull
        default com.helger.commons.state.EChange removeDataAttr​(@Nullable
                                                                String sName)
        Remove the data attribute with the specified name. Shortcut for removeCustomAttr ("data-"+sName).
        Parameters:
        sName - The name of the data attribute to be removed
        Returns:
        this
      • setAriaControls

        @Nonnull
        default com.helger.commons.state.EChange setAriaControls​(@Nonnull
                                                                 String sControls)
      • setAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange setAriaDescribedBy​(@Nonnull
                                                                    String sDescribedBy)
      • addToAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange addToAriaDescribedBy​(@Nonnull
                                                                      String sDescribedBy)
      • setAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange setAriaDescribedBy​(@Nonnull
                                                                    IHCElement<?> aDescribedBy)
      • addToAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange addToAriaDescribedBy​(@Nonnull
                                                                      IHCElement<?> aDescribedBy)
      • setAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange setAriaDescribedBy​(@Nonnull
                                                                    IHCElement<?>... aDescribedByMultiple)
      • addToAriaDescribedBy

        @Nonnull
        default com.helger.commons.state.EChange addToAriaDescribedBy​(@Nonnull
                                                                      IHCElement<?>... aDescribedByMultiple)
      • setAriaExpanded

        @Nonnull
        default com.helger.commons.state.EChange setAriaExpanded​(boolean bIsExpanded)
      • setAriaHasPopup

        @Nonnull
        default com.helger.commons.state.EChange setAriaHasPopup​(boolean bHasPopup)
      • setAriaHidden

        @Nonnull
        default com.helger.commons.state.EChange setAriaHidden​(boolean bHidden)
      • setAriaInvalid

        @Nonnull
        default com.helger.commons.state.EChange setAriaInvalid​(boolean bInvalid)
      • setAriaLabeledBy

        @Nonnull
        default com.helger.commons.state.EChange setAriaLabeledBy​(@Nonnull
                                                                  String sLabeledBy)
      • setAriaLabeledBy

        @Nonnull
        default com.helger.commons.state.EChange setAriaLabeledBy​(@Nonnull
                                                                  IHCElement<?>... aLabeledByMultiple)
      • setAriaRequired

        @Nonnull
        default com.helger.commons.state.EChange setAriaRequired​(boolean bIsRequired)