Class ObjectGraphMeasurer.Footprint

  • Enclosing class:
    ObjectGraphMeasurer

    public static final class ObjectGraphMeasurer.Footprint
    extends Object
    The footprint of an object graph.
    • Constructor Summary

      Constructors 
      Constructor Description
      Footprint​(int objects, int nonNullRefs, int nullRefs, com.google.common.collect.Multiset<Class<?>> primitives)
      Constructs a Footprint, by specifying the number of objects, references, and primitives (represented as a Multiset).
    • Constructor Detail

      • Footprint

        public Footprint​(int objects,
                         int nonNullRefs,
                         int nullRefs,
                         com.google.common.collect.Multiset<Class<?>> primitives)
        Constructs a Footprint, by specifying the number of objects, references, and primitives (represented as a Multiset).
        Parameters:
        objects - the number of objects
        nonNullRefs - the number of non-null references
        nullRefs - the number of null references
        primitives - the number of primitives (represented by the respective primitive classes, e.g. int.class etc)
    • Method Detail

      • getObjects

        public int getObjects()
        Returns the number of objects of this footprint.
      • getNonNullReferences

        public int getNonNullReferences()
        Returns the number of non-null references of this footprint.
      • getNullReferences

        public int getNullReferences()
        Returns the number of null references of this footprint.
      • getAllReferences

        public int getAllReferences()
        Returns the number of all references (null and non-null) of this footprint.
      • getPrimitives

        public com.google.common.collect.ImmutableMultiset<Class<?>> getPrimitives()
        Returns the number of primitives of this footprint (represented by the respective primitive classes, e.g. int.class etc).
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object