Class MdibEntityImpl

    • Method Detail

      • getLastChanged

        public MdibVersion getLastChanged()
        Description copied from interface: MdibEntity
        Gets the MDIB version of the entity where it has been changed the last time.
        Specified by:
        getLastChanged in interface MdibEntity
        Returns:
        an MDIB version.
      • getChildren

        public List<String> getChildren()
        Description copied from interface: MdibEntity
        Obtain a read-only list of the MDIB entity's child handles.
        Specified by:
        getChildren in interface MdibEntity
        Returns:
        readable list of children currently associated with the entity.
      • getDescriptor

        public AbstractDescriptor getDescriptor()
        Description copied from interface: MdibEntity
        Obtain the entity's descriptor.
        Specified by:
        getDescriptor in interface MdibEntity
        Returns:
        descriptor information currently associated with the entity.
      • getDescriptor

        public <T extends AbstractDescriptorOptional<T> getDescriptor​(Class<T> theClass)
        Description copied from interface: MdibEntity
        Obtains the entity's descriptor as a given type.
        Specified by:
        getDescriptor in interface MdibEntity
        Type Parameters:
        T - the descriptor class type.
        Parameters:
        theClass - the class to cast.
        Returns:
        descriptor information currently associated with the entity.
      • getHandle

        public String getHandle()
        Description copied from interface: MdibEntity
        Unique name to identify the entity.

        Short-hand for getDescriptor().getHandle()

        Specified by:
        getHandle in interface MdibEntity
        Returns:
        the entity's unique handle.
      • getStates

        public List<AbstractState> getStates()
        Description copied from interface: MdibEntity
        Obtains a copy of the MDIB entity's state list.
        Specified by:
        getStates in interface MdibEntity
        Returns:
        list of states currently associated with the entity.
      • getStates

        public <T extends AbstractStateList<T> getStates​(Class<T> theClass)
        Description copied from interface: MdibEntity
        Obtains the list of states cast to a specific type.
        Specified by:
        getStates in interface MdibEntity
        Type Parameters:
        T - the state class type.
        Parameters:
        theClass - the class to cast.
        Returns:
        list of cast states currently associated with the entity. Please note that this list is empty either if there is no state available or there is no state available with the given type information.
      • getFirstState

        public <T extends AbstractStateOptional<T> getFirstState​(Class<T> theClass)
        Description copied from interface: MdibEntity
        Obtains the first state if available.

        This function is useful to retrieve single state information.

        Specified by:
        getFirstState in interface MdibEntity
        Type Parameters:
        T - the state class type.
        Parameters:
        theClass - the class to cast.
        Returns:
        the cast type of Optional.empty() if there is no first state or a class cast error.
      • getDescriptorClass

        public Class<? extends AbstractDescriptor> getDescriptorClass()
        Description copied from interface: MdibEntity
        Gets the descriptor class.

        Short-hand for getDescriptor().getClass().

        Specified by:
        getDescriptorClass in interface MdibEntity
        Returns:
        the descriptor class of the entity.