Predicate used to exclude, False, or include, True, a computed value.
493503
def _filter(self, value):
        
        if self.ignores and value in self.ignores:
            return False
        return True
467482
public static boolean contains(Iterable<?> iterable, Object value)
    {
        if (iterable instanceof Collection)
        {
            return ((Collection<?>) iterable).contains(value);
        }
        if (iterable instanceof RichIterable)
        {
            return ((RichIterable<?>) iterable).contains(value);
        }
        return IterableIterate.detectIndex(iterable, Predicates.equal(value)) > -1;
    }
356493
def add_predicate(self, key, value, predicate_type='equals'):
        
        if predicate_type not in operators:
            predicate_type = operator_lkup.get(predicate_type)
        if predicate_type:
            self.predicates.append({'type': predicate_type,
                                    'key': key,
                                    'value': value
                                    })
        else:
            raise Exception("predicate type not a valid operator")
517782
function coerce(name, value) {
  var def = 1
  var result
  var level

  /* istanbul ignore if - Handled by unified in v6.0.0 */
  if (typeof value === 'boolean') {
    result = [value]
  } else if (value == null) {
    result = [def]
  } else if (
    typeof value === 'object' &&
    (typeof value[0] === 'number' ||
      typeof value[0] === 'boolean' ||
      typeof value[0] === 'string')
  ) {
    result = value.concat()
  } else {
    result = [1, value]
  }

  level = result[0]

  if (typeof level === 'boolean') {
    level = level ? 1 : 0
  } else if (typeof level === 'string') {
    if (level === 'off') {
      level = 0
    } else if (level === 'on' || level === 'warn') {
      level = 1
    } else if (level === 'error') {
      level = 2
    } else {
      level = 1
      result = [level, result]
    }
  }

  if (level < 0 || level > 2) {
    throw new Error(
      'Invalid severity `' +
        level +
        '` for `' +
        name +
        '`, ' +
        'expected 0, 1, or 2'
    )
  }

  result[0] = level

  return result
}
1205877
def unwrap(self, value, session=None):
        ''' '''
        self.validate_unwrap(value)
        return self.computed_type.unwrap(value, session=session)
678591
def wrap_value(value, include_empty=False):
    

    if value is None:
        return [None] if include_empty else []
    elif hasattr(value, '__len__') and len(value) == 0:
        return [value] if include_empty else []
    elif isinstance(value, _wrap_types):
        return [value]
    elif not hasattr(value, '__iter__'):
        return [value]

    return value if include_empty else filter_empty(value, [])
89125
def coerce(value):
        
        is_number = lambda x: isinstance(x, (int, float, complex)) #is x an instance of those things
        if isinstance(value, IntervalCell) or issubclass(value.__class__,IntervalCell): 
            #if intervalcell or subclass, return the subclass
            return value
        elif is_number(value):
            return IntervalCell(value, value)
        elif hasattr(value, 'low') and hasattr(value, 'high'):
            # duck type
            assert value.low <= value.high, "Invalid low/high in %s" % str(value)
            return value
        elif isinstance(value, (list, tuple)) and all(map(is_number, value)):
            if len(value) == 1:
                low, high = value[0], value[0]
            elif len(value) == 2:
                low, high = value
            else:
                low, high = min(value), max(value)
            if high < low:
                raise Contradiction("Low must be lte High") 
            return IntervalCell(low, high)
        else:
            raise Exception("Don't know how to coerce %s" % (type(value)))
1353511
function ofModifier (target, type, predicate) {
    var modifiedPredicate = function () {
      var collection, args;

      collection = arguments[0];

      if (target === 'maybe' && not.assigned(collection)) {
        return true;
      }

      if (!type(collection)) {
        return false;
      }

      collection = coerceCollection(type, collection);
      args = slice.call(arguments, 1);

      try {
        collection.forEach(function (item) {
          if (
            (target !== 'maybe' || assigned(item)) &&
            !predicate.apply(null, [ item ].concat(args))
          ) {
            // TODO: Replace with for...of when ES6 is required.
            throw 0;
          }
        });
      } catch (ignore) {
        return false;
      }

      return true;
    };
    modifiedPredicate.l = predicate.length;
    return modifiedPredicate;
  }
336249
private Object filterValue(Object value)
   {
      if (value instanceof Boolean && !((Boolean) value).booleanValue())
      {
         value = null;
      }
      if (value instanceof String && ((String) value).isEmpty())
      {
         value = null;
      }
      if (value instanceof Double && ((Double) value).doubleValue() == 0.0)
      {
         value = null;
      }
      if (value instanceof Integer && ((Integer) value).intValue() == 0)
      {
         value = null;
      }
      if (value instanceof Duration && ((Duration) value).getDuration() == 0.0)
      {
         value = null;
      }

      return value;
   }
538344
def __filter(filterable, filter_, logic_operation='and'):
        
        condition = []
        if not filter_:
            return filterable
        elif filter_.get('type') == '__ANY__':
            return filterable
        else:
            for key, value in filter_.items():
                condition.append('{key} == "{value}"'.format(key=key, value=value))
        try:
            res = filterable.query(" {operation} ".format(operation=logic_operation).join(condition))
        except pd.core.computation.ops.UndefinedVariableError:
            return pd.DataFrame()
        else:
            return res
1351205
def wrap(self, value):
        ''' '''
        self.validate_wrap(value)
        return self.computed_type.wrap(value)
308540
def p_filter_expr_predicate(p):
    
    if not hasattr(p[1], 'append_predicate'):
        p[1] = ast.PredicatedExpression(p[1])
    p[1].append_predicate(p[2])
    p[0] = p[1]
615287
function keyFilter(obj, predicate) {
  var result = {}, key; // eslint-disable-line

  for (key in obj) { // eslint-disable-line
    if (obj[key] && predicate(key)) {
      result[key] = obj[key];
    }
  }

  return result;
}
650413
function reject(pred, m) {
  if(!isPredOrFunc(pred)) {
    throw new TypeError(
      'reject: Pred or predicate function required for first argument'
    )
  }

  const fn =
    x => predOrFunc(pred, x)

  if(m && isFunction(m.reject)) {
    return m.reject(fn)
  }

  if(isArray(m)) {
    return m.filter(not(fn))
  }

  if(isObject(m)) {
    return object.filter(not(fn), m)
  }

  throw new TypeError('reject: Foldable or Object required for second argument')
}
900414
function processLogicalCondition(tokenizer, scope) {
  let node = processAddSubtract(tokenizer, scope);

  while (tokenizer.token.match(types.LOGICAL_CONDITION)) {
    node = createOperatorNode(tokenizer.token.value, [node, processAddSubtract(tokenizer.skipToken(), scope)]);
  }

  return node;
}
47168
function shouldExclude(sets) {
        for (var i = 0; i < sets.length; ++i) {
            if (!(sets[i] in exclude)) {
                return false;
            }
        }
        return true;
    }
307762
public boolean containsValue(Object val) {
        synchronized( this ) {
            for( V item : values() ) {
                if( item instanceof CachedItem ){
                    CachedItem ci = (CachedItem)item;

                    if( ci.isValidForCache() && ci.equals(val) ) {
                        return true;
                    }
                }
                else if( item.equals(val) ) {
                    return true;
                }
            }
        }
        return false;
    }