java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.util.Counter<T>

public class Counter<T> extends Object
Deprecated.
use the counter in matching-jena-matchers.
A Counter is for counting arbitrary objects.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<T,Integer>
    Deprecated.
     
    protected int
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Collection<T> collection)
    Deprecated.
    Add a collection of elements to the counter.
    void
    add(T t)
    Deprecated.
    Add one element to the counter
    void
    add(T it, int v)
    Deprecated.
    Add the element (first parameter) multiple times (amount is specified in the second parameter).
    int
    Deprecated.
    Returns the amount of distinct elements.
    int
    Deprecated.
    Get the number of how many elements which were added to this counter (this includes duplicates).
    int
    Deprecated.
    Get the count for a specific element.
    Deprecated.
    Returns the set of distinct elements.
    Deprecated.
    Return a list of the most common elements and their counts.
    mostCommon(int n)
    Deprecated.
    Return a list of the n most common elements and their counts.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • counts

      protected Map<T,Integer> counts
      Deprecated.
    • overallCount

      protected int overallCount
      Deprecated.
  • Constructor Details

    • Counter

      public Counter()
      Deprecated.
  • Method Details

    • add

      public void add(Collection<T> collection)
      Deprecated.
      Add a collection of elements to the counter.
      Parameters:
      collection - the collection to be added.
    • add

      public void add(T t)
      Deprecated.
      Add one element to the counter
      Parameters:
      t - the element to add
    • add

      public void add(T it, int v)
      Deprecated.
      Add the element (first parameter) multiple times (amount is specified in the second parameter).
      Parameters:
      it - the element to add
      v - how often does this element should be added
    • getCount

      public int getCount(T t)
      Deprecated.
      Get the count for a specific element.
      Parameters:
      t - the element for which the count should be returned
      Returns:
      how often this element occured.
    • getCount

      public int getCount()
      Deprecated.
      Get the number of how many elements which were added to this counter (this includes duplicates).
      Returns:
      how many elements are added to this list
    • getDistinctElements

      public Set<T> getDistinctElements()
      Deprecated.
      Returns the set of distinct elements.
      Returns:
      the set of distinct elements
    • getAmountOfDistinctElements

      public int getAmountOfDistinctElements()
      Deprecated.
      Returns the amount of distinct elements.
      Returns:
      amount of distinct elements
    • mostCommon

      public List<Map.Entry<T,Integer>> mostCommon(int n)
      Deprecated.
      Return a list of the n most common elements and their counts. Ordered from the most common to the least.
      Parameters:
      n - number of common elements to return
      Returns:
      list of entries
    • mostCommon

      public List<Map.Entry<T,Integer>> mostCommon()
      Deprecated.
      Return a list of the most common elements and their counts. Ordered from the most common to the least.
      Returns:
      list of entries