Package cdc.enums

Class AbstractBaseListSupport<V>

    • Field Detail

      • logger

        protected final org.apache.logging.log4j.Logger logger
    • Constructor Detail

      • AbstractBaseListSupport

        protected AbstractBaseListSupport​(Class<V> cls,
                                          DagFeature... features)
    • Method Detail

      • addEventHandler

        public final void addEventHandler​(DagEventHandler handler)
        Description copied from interface: ListType
        Adds an event handler.
        Specified by:
        addEventHandler in interface ListType<V>
        Parameters:
        handler - The event handler.
      • removeEventHandler

        public final void removeEventHandler​(DagEventHandler handler)
        Description copied from interface: ListType
        Removes an event handler.
        Specified by:
        removeEventHandler in interface ListType<V>
        Parameters:
        handler - The event handler.
      • fire

        protected final void fire​(V value,
                                  DagEventType eventType)
      • isSupported

        public final boolean isSupported​(DagFeature feature)
        Description copied from interface: ListType
        Returns true when a feature is supported.

        Locking may make a feature not available even if it is supported.

        Specified by:
        isSupported in interface ListType<V>
        Parameters:
        feature - The feature.
        Returns:
        true when feature is supported.
      • getValueClass

        public final Class<V> getValueClass()
        Specified by:
        getValueClass in interface ListType<V>
        Returns:
        The enum value class.
      • checkIsValid

        protected final void checkIsValid​(V value)
        Checks that a value is valid.
        Parameters:
        value - The value.
        Throws:
        IllegalArgumentException - When value is not valid.
      • checkIsSupported

        protected final void checkIsSupported​(DagFeature feature)
        Checks that a feature is supported.
        Parameters:
        feature - The feature.
        Throws:
        IllegalArgumentException - When feature is not supported.
      • isContained

        protected abstract boolean isContained​(V value)
        Returns true if a value is contained by this support.
        Parameters:
        value - The value.
        Returns:
        true if value is contained by this support.