Returns a function that checks that each element in a
    set is of a specific type.
185534
def set_of(cls):
    
    return lambda l: isinstance(l, set) and all(isinstance(x, cls) for x in l)
335982
def oftype(self, typ):
        ''''''
        for key, val in self.items():
            if val.type == typ:
                yield key
125420
def _check_type(self, check_type, properties):
        """"""
        if 'PrimitiveType' in properties:
            return properties['PrimitiveType'] == check_type
        if properties['Type'] == 'List':
            if 'ItemType' in properties:
                return properties['ItemType'] == check_type
            else:
                return properties['PrimitiveItemType'] == check_type
        return False
213246
function isType(type, input) {
	if (input === null) {
		return type.toLowerCase() === 'null';
	}

	return typeof input === type.toLowerCase() || Type.is(type, input);
}
429287
def typechecked_class(cls, force = False, force_recursive = False):
    
    return _typechecked_class(cls, set(), force, force_recursive)
74916
function isElementInList(str, list) {
	if (typeof str === 'string' && typeof list == 'object' && list.indexOf) {
		var strUpper = str.toUpperCase();
		return list.indexOf(strUpper) !== -1;
	} else {
		return false;
	}
}
831262
function checkType(value, type) {
  if (typeof type === 'string') {
    switch (type) {
      case 'string':
      case 'object':
      case 'number':
      case 'boolean':
      case 'function':
        return typeof value === type;
      case 'class':
        return typeof value === 'function';
      case 'array':
        return value.constructor === Array;
      default:
        return false;
    }
  }
  else {
    return value instanceof type;
  }
}
197777
function set() {
    function Set() {}
    var ret = new Set();
    var arg, i, len;

    for(i = 0, len = arguments.length; i < len; i++) {
        arg = arguments[i];

        if(arg.constructor.name == 'Set') Object.keys(arg).filter(
            not(prop.bind(undefined, ret))
        ).forEach(addElem.bind(undefined, ret));
        else if(!(arg in ret)) addElem(ret, arg);
    }

    return Object.preventExtensions(ret);
}
1199361
protected void checkCollectionType(Collection c) {
        if (type != null) {
            for (Object element : c) {
                checkType(element);
            }
        }
    }
622563
def bool_set(operation,*sets):
    ''''''
    if len(sets)<=1:
        return sets
    if operation=='and':
        return and_sets(*sets)
    if operation=='or':
        return or_sets(*sets)
    if operation=='not':
        return not_sets(*sets)
972207
function(TYPE){
  var IS_MAP   = TYPE == 1
    , IS_EVERY = TYPE == 4;
  return function(object, callbackfn, that /* = undefined */){
    var f      = ctx(callbackfn, that, 3)
      , O      = toIObject(object)
      , result = IS_MAP || TYPE == 7 || TYPE == 2
          ? new (typeof this == 'function' ? this : Dict) : undefined
      , key, val, res;
    for(key in O)if(has(O, key)){
      val = O[key];
      res = f(val, key, object);
      if(TYPE){
        if(IS_MAP)result[key] = res;            // map
        else if(res)switch(TYPE){
          case 2: result[key] = val; break;     // filter
          case 3: return true;                  // some
          case 5: return val;                   // find
          case 6: return key;                   // findKey
          case 7: result[res[0]] = res[1];      // mapPairs
        } else if(IS_EVERY)return false;        // every
      }
    }
    return TYPE == 3 || IS_EVERY ? IS_EVERY : result;
  };
}
763650
private static <E extends Element> Set<E> setFilter(Set<? extends Element> elements,
                                                        Set<ElementKind> targetKinds,
                                                        Class<E> clazz) {
        // Return set preserving iteration order of input set.
        Set<E> set = new LinkedHashSet<E>();
        for (Element e : elements) {
            if (targetKinds.contains(e.getKind()))
                set.add(clazz.cast(e));
        }
        return set;
    }
37770
def methods():
    ""
    pairs = inspect.getmembers(Containerizer, predicate=inspect.ismethod)
    return set(k for k, _ in pairs if k[0:1] != "_")
371701
def infer_set(values: GenericSet) -> Set:
    """"""
    if not values:
        return Set(null)
    return Set(highest_precedence(map(infer, values)))
756879
function check(value, ...validators) {
    let valid = false;
    _.each(validators, (validator) => {
        return !(valid = validator(value));
    });

    if (!valid) {
        throw new TypeError('Argument is not any of the accepted types.');
    }
}
637979
function matches(query, ele) {
  return query.checks.every(function (chk) {
    return match[chk.type](chk, ele);
  });
}
566904
Set<ElementKind> getKinds(Element element) {
    final ImmutableSet.Builder<ElementKind> kinds = ImmutableSet.builder();

    if (element.getKind() == ElementKind.INTERFACE) {
      kinds.add(ElementKind.METHOD);
    }

    if (element.getKind() == ElementKind.CLASS) {
      kinds.add(ElementKind.FIELD);

      if (element.getModifiers().contains(Modifier.ABSTRACT)) {
        kinds.add(ElementKind.METHOD);
      }
    }

    return kinds.build();
  }