// IsSubsetOf returns true if the supplied set contains all the elements
485830
func (s CPUSet) IsSubsetOf(s2 CPUSet) bool {
	result := true
	for cpu := range s.elems {
		if !s2.Contains(cpu) {
			result = false
			break
		}
	}
	return result
}
374920
func Contains(collection []string, key string) bool {
	for _, value := range collection {
		if value == key {
			return true
		}
	}

	return false
}
12699
func (s *stringSet) Contains(v string) bool {
	_, ok := s.values[v]
	return ok
}
137328
func isSubType(protoProp *ProtoProperty) bool {
	if (protoProp.Type == "object" && !protoProp.IsNonPropertiesObject()) || (protoProp.Type == "array" && protoProp.Items.Type == "object") {
		return true
	}
	return false
}
610271
func (s *set) Each(f func(item interface{}) bool) {
	for item := range s.m {
		if !f(item) {
			break
		}
	}
}
1244279
func (set LiteralFieldSet) Contains(i LiteralField) bool {
	_, found := set[i]
	return found
}
838941
func subsetOfGroups(inner, outer map[string]*cb.ConfigGroup) bool {
	// The empty set is a subset of all sets
	if len(inner) == 0 {
		return true
	}

	// If inner has more elements than outer, it cannot be a subset
	if len(inner) > len(outer) {
		return false
	}

	// If any element in inner is not in outer, it is not a subset
	for key := range inner {
		if _, ok := outer[key]; !ok {
			return false
		}
	}

	return true
}
888053
func (s1 Byte) IsSuperset(s2 Byte) bool {
	for item := range s2 {
		if !s1.Has(item) {
			return false
		}
	}
	return true
}
143287
func (s *set) Contains(t *Term) bool {
	return s.get(t) != nil
}
1237198
func contains(slice []string, el string) bool {
	for _, e := range slice {
		if e == el {
			return true
		}
	}
	return false
}
863724
func (s *OrderedSet) IsSubset(other *OrderedSet) bool {
	for _, i := range other.s {
		if !s.Contains(i) {
			return false
		}
	}
	return true
}
934709
function isSubsetOf(subset, superset, cmp, contains, ordered) {
    if (!contains) {
      if (subset.length !== superset.length) return false;
      superset = superset.slice();
    }

    return subset.every(function(elem, idx) {
      if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];

      if (!cmp) {
        var matchIdx = superset.indexOf(elem);
        if (matchIdx === -1) return false;

        // Remove match from superset so not counted twice if duplicate in subset.
        if (!contains) superset.splice(matchIdx, 1);
        return true;
      }

      return superset.some(function(elem2, matchIdx) {
        if (!cmp(elem, elem2)) return false;

        // Remove match from superset so not counted twice if duplicate in subset.
        if (!contains) superset.splice(matchIdx, 1);
        return true;
      });
    });
  }
1315141
func filterIsSubset(a, b []Filter) bool {
	if len(a) > len(b) {
		return false
	}
	var ib int
	for ia := range a {
		found := false
		for ; ib < len(b); ib++ {
			if a[ia].Field > b[ib].Field {
				// not same filter
				continue
			}
			if a[ia].Field < b[ib].Field {
				// field not in b
				return false
			}

			if a[ia].CompOp == b[ib].CompOp && a[ia].Value == b[ib].Value {
				found = true
				break
			}
			if filterContains(a[ia], b[ib]) {
				found = true
				break
			}
			return false
		}
		if !found {
			return false
		}
	}
	return true
}
1219945
func (s Set) Contains(other Set) bool {
	for k := range other {
		if !s.Has(k) {
			return false
		}
	}
	return true
}
1191668
func (s *Set) IsSet(name interface{}) bool {
	if opt := s.Lookup(name); opt != nil {
		return opt.Seen()
	}
	return false
}
927170
func (s *SyncedSet) Contains(datas ...interface{}) bool {
	s.RLock()
	defer s.RUnlock()
	for _, data := range datas {
		if _, ok := s.set[data]; !ok {
			return false
		}
	}
	return true
}
1114823
func (s *Set) IsSubset(t Interface) (subset bool) {
	s.l.RLock()
	defer s.l.RUnlock()

	subset = true

	t.Each(func(item interface{}) bool {
		_, subset = s.m[item]
		return subset
	})

	return
}