Class InterpolatingVertexSizeTransformer<V>

  • All Implemented Interfaces:
    com.google.common.base.Function<V,​java.lang.Integer>, java.util.function.Function<V,​java.lang.Integer>

    public class InterpolatingVertexSizeTransformer<V>
    extends java.lang.Object
    implements com.google.common.base.Function<V,​java.lang.Integer>
    Provides vertex sizes that are spaced proportionally between min_size and max_size depending on
    Author:
    Joshua O'Madadhain
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double max  
      protected double min  
      protected int min_size  
      protected int size_diff  
      protected com.google.common.base.Function<V,​? extends java.lang.Number> values  
    • Constructor Summary

      Constructors 
      Constructor Description
      InterpolatingVertexSizeTransformer​(com.google.common.base.Function<V,​? extends java.lang.Number> values, int min_size, int max_size)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Integer apply​(V v)  
      void setMaxSize​(int max_size)  
      void setMinSize​(int min_size)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Field Detail

      • min

        protected double min
      • max

        protected double max
      • values

        protected com.google.common.base.Function<V,​? extends java.lang.Number> values
      • min_size

        protected int min_size
      • size_diff

        protected int size_diff
    • Constructor Detail

      • InterpolatingVertexSizeTransformer

        public InterpolatingVertexSizeTransformer​(com.google.common.base.Function<V,​? extends java.lang.Number> values,
                                                  int min_size,
                                                  int max_size)
    • Method Detail

      • apply

        public java.lang.Integer apply​(V v)
        Specified by:
        apply in interface com.google.common.base.Function<V,​java.lang.Integer>
        Specified by:
        apply in interface java.util.function.Function<V,​java.lang.Integer>
      • setMinSize

        public void setMinSize​(int min_size)
      • setMaxSize

        public void setMaxSize​(int max_size)