Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.util.filter
Class ArrayFilter.WeightedFilter

java.lang.Object
  extended by com.tangosol.util.filter.ArrayFilter.WeightedFilter

All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
ArrayFilter

protected static class ArrayFilter.WeightedFilter
extends java.lang.Object
implements java.lang.Comparable

A thin wrapper around a Filter allowing for sorting the filters according to their effectiveness.


Constructor Summary
protected ArrayFilter.WeightedFilter(Filter filter, int nEffect)
          Construct the WeightedFilter.

 

Method Summary
 int compareTo(java.lang.Object o)
          Compares this WeightedFilter with the specified WeightedFilter for order.
 int getEffectiveness()
          Get the effectiveness value of the wrapped filter.
 Filter getFilter()
          Get the wrapped filter.

 

Constructor Detail

ArrayFilter.WeightedFilter

protected ArrayFilter.WeightedFilter(Filter filter,
                                     int nEffect)
Construct the WeightedFilter.
Parameters:
filter - the wrapped filter
nEffect - the filter's effectiveness

Method Detail

compareTo

public int compareTo(java.lang.Object o)
Compares this WeightedFilter with the specified WeightedFilter for order. Returns a negative integer, zero, or a positive integer as this WeightedFilter's effectiveness is less than, equal to, or greater than the effectiveness of the specified WeightedFilter object.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the Object to be compared
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this WeightedFilter

getFilter

public Filter getFilter()
Get the wrapped filter.
Returns:
the wrapped filter

getEffectiveness

public int getEffectiveness()
Get the effectiveness value of the wrapped filter.
Returns:
the effectiveness of the wrapped filter

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.