Interface UsageFilter<T extends UseCount>

Type Parameters:
T - the UseCount class
All Known Implementing Classes:
UsagePercentFilter, UsageWindFilter

public interface UsageFilter<T extends UseCount>
A utility class to filter beans with usage counts.
Since:
10.2
Version:
10.2
Author:
Luke
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<T>
    Filters a Collection of UseCount beans.
    boolean
    filter(T uc, int max, int total)
    Filters an individual bean.
  • Method Details

    • filter

      boolean filter(T uc, int max, int total)
      Filters an individual bean.
      Parameters:
      uc - the UseCount bean
      max - the maximum usage per bean within this Collection
      total - the total bean usage within this Collection
      Returns:
      TRUE if the bean should be included, otherwise FALSE
    • filter

      default List<T> filter(Collection<T> data)
      Filters a Collection of UseCount beans.
      Parameters:
      data - the beans to filter
      Returns:
      a filtered List of beans that met the criteria