Class MostCommon

    • Field Detail

      • m_SaveThread

        protected static Thread m_SaveThread
        the threading for saving.
      • m_Counter

        protected static NamedCounter m_Counter
        the count per actor.
    • Constructor Detail

      • MostCommon

        public MostCommon()
    • Method Detail

      • isEnabled

        public boolean isEnabled​(Node added)
        Returns whether the recording is active.
        Specified by:
        isEnabled in class AbstractRecordActorAdded
        Parameters:
        added - the node that got added (for context)
        Returns:
        true if active
      • getFilename

        protected static String getFilename()
        Returns the filename for storing the data.
        Returns:
        the filename
      • initCounter

        protected static void initCounter()
        Initializes the counter.
      • save

        protected static String save()
        Performs the actual save operation.
      • saveCounter

        protected static void saveCounter()
        Saves the counter as CSV file.
      • record

        protected void record​(Actor added,
                              Actor parent,
                              Actor before,
                              Actor after,
                              TreeOperations.InsertPosition position)
        Records the actor that was added.
        Specified by:
        record in class AbstractRecordActorAdded
        Parameters:
        added - the actor that was added
        parent - the parent of the added actor
        before - the immediate actor before the added actor, can be null
        after - the immediate actor after the added actor, can be null
        position - how the actor was added
      • getMostCommon

        public static List<String> getMostCommon​(int max)
        Returns the X most common actors.
        Parameters:
        max - the maximum number of actors, <= 0 for all
        Returns:
        the list of actor names