Interface Function

  • All Known Subinterfaces:
    AttributeFunction, GraphFunction, PartitionFunction, RankingFunction, SimpleFunction

    public interface Function
    Functions represent the various transformations that can be applied to the graph elements. Each function is specific to an element class (i.e. nodes or edges), to a specific transformer and to a specific source (e.g. a ranking or a partition).

    This interface has sub-interfaces specific to the type of function.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Class<? extends Element> getElementClass()
      Returns the element class this function will be applied to.
      Graph getGraph()
      Returns the graph this function is being applied on.
      String getId()
      Returns the function's unique identifier.
      AppearanceModel getModel()
      Returns the model this function belongs to.
      <T extends Transformer>
      T
      getTransformer()
      Returns the transformer associated with this function.
      TransformerUI getUI()
      Returns the transformer user interface associated with this function.
      boolean hasChanged()
      Returns true if the underlying partition or ranking changed its boundaries or values since last time checked.
      boolean isAttribute()
      Returns true if this function is based on attribute column.
      boolean isPartition()
      Returns true if this function is a partition function.
      boolean isRanking()
      Returns true if this function is a ranking function.
      boolean isSimple()
      Returns true if this function is a simple function.
      boolean isValid()
      Returns true if the function is valid.
      void transform​(Element element)
      Transforms the given element.
      void transformAll​(Iterable<? extends Element> elementIterable)
      Transforms all the given elements.
    • Method Detail

      • transform

        void transform​(Element element)
        Transforms the given element.
        Parameters:
        element - element to transform
      • transformAll

        void transformAll​(Iterable<? extends Element> elementIterable)
        Transforms all the given elements.
        Parameters:
        elementIterable - element iterable to tranform
      • getTransformer

        <T extends Transformer> T getTransformer()
        Returns the transformer associated with this function.
        Type Parameters:
        T - transformer class
        Returns:
        transformer
      • getUI

        TransformerUI getUI()
        Returns the transformer user interface associated with this function.
        Returns:
        transformer UI or null if not found
      • isSimple

        boolean isSimple()
        Returns true if this function is a simple function.

        If true, this instance can be casted to SimpleFunction.

        Returns:
        true if partition, false otherwise
      • isAttribute

        boolean isAttribute()
        Returns true if this function is based on attribute column.

        If true, this instance can be casted to AttributeFunction.

        Returns:
        true if attribute, false otherwise
      • isRanking

        boolean isRanking()
        Returns true if this function is a ranking function.

        If true, this instance can be casted to RankingFunction.

        Returns:
        true if ranking, false otherwise
      • isPartition

        boolean isPartition()
        Returns true if this function is a partition function.

        If true, this instance can be casted to PartitionFunction.

        Returns:
        true if partition, false otherwise
      • getElementClass

        Class<? extends Element> getElementClass()
        Returns the element class this function will be applied to.
        Returns:
        element class
      • getGraph

        Graph getGraph()
        Returns the graph this function is being applied on.
        Returns:
        graph
      • getModel

        AppearanceModel getModel()
        Returns the model this function belongs to.
        Returns:
        model
      • hasChanged

        boolean hasChanged()
        Returns true if the underlying partition or ranking changed its boundaries or values since last time checked.
        Returns:
        true if changed, false otherwise
      • getId

        String getId()
        Returns the function's unique identifier.
        Returns:
        function id
      • isValid

        boolean isValid()
        Returns true if the function is valid. A function may not be valid if the underlying column has been removed for instance.
        Returns:
        true if valid, false otherwise