Class BaseNodeItemContainerWithName<I extends io.github.mmm.code.api.item.CodeItem>

Type Parameters:
I - the type of the contained CodeItem.
All Implemented Interfaces:
io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.item.CodeItem, io.github.mmm.code.api.item.CodeMutableItem, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeContainer<I>, io.github.mmm.code.api.node.CodeNodeItem, io.github.mmm.code.api.node.CodeNodeItemContainer<I>, io.github.mmm.code.api.node.CodeNodeItemContainerWithName<I>, io.github.mmm.code.api.object.CodeMutable, Iterable<I>
Direct Known Subclasses:
BaseNodeItemContainerFlatWithName, BaseNodeItemContainerHierarchicalWithName

public abstract class BaseNodeItemContainerWithName<I extends io.github.mmm.code.api.item.CodeItem> extends BaseNodeItemContainer<I> implements io.github.mmm.code.api.node.CodeNodeItemContainerWithName<I>
Base implementation of CodeNodeItemContainerWithName.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • BaseNodeItemContainerWithName

      protected BaseNodeItemContainerWithName()
      The constructor.
    • BaseNodeItemContainerWithName

      public BaseNodeItemContainerWithName(BaseNodeItemContainerWithName<I> template, io.github.mmm.code.api.copy.CodeCopyMapper mapper)
      The copy-constructor.
      Parameters:
      template - the BaseNodeItemContainerWithName to copy.
      mapper - the CodeCopyMapper.
  • Method Details

    • get

      public I get(String name)
      Specified by:
      get in interface io.github.mmm.code.api.node.CodeNodeItemContainerWithName<I extends io.github.mmm.code.api.item.CodeItem>
    • get

      protected I get(String name, boolean init)
      Parameters:
      name - the name of the requested CodeItem.
      init - true to ensure this container is initialized, false otherwise.
      Returns:
      the CodeItem from declared items with the given name or null if no such item exists.
    • getDeclared

      public final I getDeclared(String name)
      Specified by:
      getDeclared in interface io.github.mmm.code.api.node.CodeNodeItemContainerWithName<I extends io.github.mmm.code.api.item.CodeItem>
    • getDeclared

      protected I getDeclared(String name, boolean init)
      Parameters:
      name - the name of the requested CodeItem.
      init - true to ensure this container is initialized, false otherwise.
      Returns:
      the CodeItem from the declared items with the given name or null if no such item exists.