Class UnitFilter

    • Constructor Summary

      Constructors 
      Constructor Description
      UnitFilter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean acceptUnit​(Unit u)
      Returns true fall accepted units.
      java.util.Collection<Unit> acceptUnits​(java.util.Collection<Unit> col)
      Returns a collection of accepted units in col.
      java.util.Collection<Unit> acceptUnits​(java.util.Collection<Unit> col, boolean useThis)
      Filters the given collection.
      java.lang.String getName()
      Returns a name for the filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnitFilter

        public UnitFilter()
    • Method Detail

      • acceptUnit

        public abstract boolean acceptUnit​(Unit u)
        Returns true fall accepted units.
      • acceptUnits

        public java.util.Collection<Unit> acceptUnits​(java.util.Collection<Unit> col)
        Returns a collection of accepted units in col. The original list is not modified.
      • acceptUnits

        public java.util.Collection<Unit> acceptUnits​(java.util.Collection<Unit> col,
                                                      boolean useThis)
        Filters the given collection. The result is a collection of all accepted units in col. If useThis is true, the collection itself is returnd (and modified). Otherwise, a new list is returned.
      • getName

        public java.lang.String getName()
        Returns a name for the filter.