Class FunctionImpl

    • Field Detail

      • elementClass

        protected final Class<? extends org.gephi.graph.api.Element> elementClass
      • name

        protected final String name
      • column

        protected final org.gephi.graph.api.Column column
      • lastGraph

        protected WeakReference<org.gephi.graph.api.Graph> lastGraph
      • lastTransformNullValues

        protected boolean lastTransformNullValues
    • Method Detail

      • transform

        public void transform​(org.gephi.graph.api.Element element)
        Description copied from interface: Function
        Transforms the given element.
        Specified by:
        transform in interface Function
        Parameters:
        element - element to transform
      • transformAll

        public void transformAll​(Iterable<? extends org.gephi.graph.api.Element> elementIterable)
        Description copied from interface: Function
        Transforms all the given elements.
        Specified by:
        transformAll in interface Function
        Parameters:
        elementIterable - element iterable to tranform
      • transformPartition

        private void transformPartition​(org.gephi.graph.api.Element element,
                                        org.gephi.graph.api.Graph graph)
      • transformRanking

        private void transformRanking​(org.gephi.graph.api.Element element,
                                      org.gephi.graph.api.Graph graph,
                                      Number minValue,
                                      Number maxValue)
      • hasChanged

        public boolean hasChanged()
        Description copied from interface: Function
        Returns true if the underlying partition or ranking changed its boundaries or values since last time checked.
        Specified by:
        hasChanged in interface Function
        Returns:
        true if changed, false otherwise
      • isValid

        public boolean isValid()
        Description copied from interface: Function
        Returns true if the function is valid. A function may not be valid if the underlying column has been removed for instance.
        Specified by:
        isValid in interface Function
        Returns:
        true if valid, false otherwise
      • getGraph

        public org.gephi.graph.api.Graph getGraph()
        Description copied from interface: Function
        Returns the graph this function is being applied on.
        Specified by:
        getGraph in interface Function
        Returns:
        graph
      • getTransformer

        public Transformer getTransformer()
        Description copied from interface: Function
        Returns the transformer associated with this function.
        Specified by:
        getTransformer in interface Function
        Returns:
        transformer
      • getUI

        public TransformerUI getUI()
        Description copied from interface: Function
        Returns the transformer user interface associated with this function.
        Specified by:
        getUI in interface Function
        Returns:
        transformer UI or null if not found
      • isSimple

        public boolean isSimple()
        Description copied from interface: Function
        Returns true if this function is a simple function.

        If true, this instance can be casted to SimpleFunction.

        Specified by:
        isSimple in interface Function
        Returns:
        true if partition, false otherwise
      • isAttribute

        public boolean isAttribute()
        Description copied from interface: Function
        Returns true if this function is based on attribute column.

        If true, this instance can be casted to AttributeFunction.

        Specified by:
        isAttribute in interface Function
        Returns:
        true if attribute, false otherwise
      • isPartition

        public boolean isPartition()
        Description copied from interface: Function
        Returns true if this function is a partition function.

        If true, this instance can be casted to PartitionFunction.

        Specified by:
        isPartition in interface Function
        Returns:
        true if partition, false otherwise
      • isRanking

        public boolean isRanking()
        Description copied from interface: Function
        Returns true if this function is a ranking function.

        If true, this instance can be casted to RankingFunction.

        Specified by:
        isRanking in interface Function
        Returns:
        true if ranking, false otherwise
      • getElementClass

        public Class<? extends org.gephi.graph.api.Element> getElementClass()
        Description copied from interface: Function
        Returns the element class this function will be applied to.
        Specified by:
        getElementClass in interface Function
        Returns:
        element class
      • getId

        public String getId()
        Description copied from interface: Function
        Returns the function's unique identifier.
        Specified by:
        getId in interface Function
        Returns:
        function id
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object