Interface IdentifiedLocator

All Known Subinterfaces:
Engine, Engine.Writeable, Project

public interface IdentifiedLocator

An IdentifiedLocator is a service locator style API that allows an IdentifiedCollection to be looked up by the class the collection contains, e.g. find me the collection of Bookmarks.

  • Method Details

    • getCollectionByClass

      <T extends Identified> IdentifiedCollection<T> getCollectionByClass(Class<T> identifiedClass)
      Returns:
      an IdentifiedCollection that contains identified objects of the given collectionClass type
      Throws:
      IllegalArgumentException - if this locator doesn't know about this class
    • getCollection

      <T extends Identified, U extends IdentifiedCollection<T>> U getCollection(Class<U> collectionClass)
      Returns:
      an IdentifiedCollection by its concrete type. Useful if the collection has some specific methods on it that you need access to, rather than just the generic ones.
    • hasCollectionOf

      boolean hasCollectionOf(Class<? extends Identified> identifiedClass)
      Returns:
      true if getCollectionByClass will return something for the given collectionClass
    • getCollectionClasses

      Set<Class<? extends Identified>> getCollectionClasses()
      Returns:
      a set of classes for which this IdentifiedLocator can return a collection