Interface TransformerSource<C,​E>

  • Type Parameters:
    C - The context type of the elements this Filter operates on.
    E - The element type this Filter operates on.

    public interface TransformerSource<C,​E>
    Provides a sequence of elements from a context. Instances of this interface must be threadsafe.

    Module: filter-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>filter-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
    • Method Detail

      • getElementList

        List<E> getElementList​(C context)
        Returns a List of elements from the given context.
        Parameters:
        context - the source of the elements.
        Returns:
        a List of elements.
      • getContextType

        Class<C> getContextType()
        Returns the type of the context object this TransformerSource is compatible with.
        Returns:
        the type of the context object.
      • getElementType

        Class<E> getElementType()
        Returns the type of the elements this TransformerSource is compatible with.
        Returns:
        the type of the elements.
      • getElementCount

        int getElementCount​(C context)
        Returns the number of elements that could be produced from the given context.
        Parameters:
        context - the context whose elements should be counted.
        Returns:
        the number of elements that could be produced from the given context.