Class WithContainerBase

Object
AnchorBean<ObjectCollectionProvider>
InitializableBean<ObjectCollectionProvider, ImageInitialization>
ImageBean<ObjectCollectionProvider>
ObjectCollectionProvider
ObjectCollectionProviderUnary
WithContainerBase
All Implemented Interfaces:
Provider<ObjectCollection>
Direct Known Subclasses:
ExtendInZWithinContainer, IntersectsWithContainer, MergeBase, NotInContainer

public abstract class WithContainerBase extends ObjectCollectionProviderUnary
Base class for ObjectCollectionProviderUnary that take an optional objectsContainer bean-field.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Optional<ObjectCollection>
    Retrieves the optional container of objects.
    protected ObjectCollection
    Retrieves the required container of objects.
    ObjectCollectionProvider
    Optional provider for a container of objects.
    void
    setObjectsContainer(ObjectCollectionProvider objectsContainer)
    Optional provider for a container of objects.

    Methods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary

    createFromObjects, get, getObjects, setObjects

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WithContainerBase

      public WithContainerBase()
  • Method Details

    • containerOptional

      protected Optional<ObjectCollection> containerOptional() throws ProvisionFailedException
      Retrieves the optional container of objects.
      Returns:
      an optional containing the object collection if present, or empty if not
      Throws:
      ProvisionFailedException - if retrieving the container fails
    • containerRequired

      protected ObjectCollection containerRequired() throws ProvisionFailedException
      Retrieves the required container of objects.
      Returns:
      the object collection
      Throws:
      ProvisionFailedException - if the container is not defined or retrieving it fails
    • getObjectsContainer

      public ObjectCollectionProvider getObjectsContainer()
      Optional provider for a container of objects.
    • setObjectsContainer

      public void setObjectsContainer(ObjectCollectionProvider objectsContainer)
      Optional provider for a container of objects.