Make sure that the provided value is present on the objects list.
        Subclasses can override if they support multiple items on a list,
        to check each item instead.
974950
def _ensure_value_is_in_objects(self,val):
        
        if not (val in self.objects):
           self.objects.append(val)
134617
function(list, value) {
      if (_.isArray(list)) {
        for (var i = 0; i < list.length; i++) {
          var listItem = list[i];
          if (listItem.indexOf(value) === 0) {
            return true;
          }
        }
      } else {
        if (list.indexOf(value) === 0) {
          return true;
        }
      }
      return false;
    }
216175
def validate_member_type(self, value):
        """"""
        if self.member_type:
            for item in value:
                self.member_type.validate(item)
141263
public static void addToListIfNotExists(List<String> list, String value) {
        boolean found = false;
        for (String item : list) {
            if (item.equalsIgnoreCase(value)) {
                found = true;
                break;
            }
        }
        if (!found) {
            list.add(value);
        }
    }
23264
def validate_list(self, value):
        
        if len(value) > self.max_items:
            raise ValidationError(
                u'list must not contain more than {max_items} items.'.format(max_items=self.max_items)
            )

        if all(isinstance(item, six.string_types) for item in value) is False:
            raise ValidationError(u'list must only contain strings.')

        return value
685813
public boolean containsValue(final Object value) {
	return ! forEachPair( 
		new LongObjectProcedure() {
			public boolean apply(long iterKey, Object iterValue) {
				return (value != iterValue);
			}
		}
	);
}
612644
def validate(self, instance, value):
        
        if not self.coerce and not isinstance(value, self._class_container):
            self.error(instance, value)
        if self.coerce and not isinstance(value, CONTAINERS):
            value = [value]
        if not isinstance(value, self._class_container):
            out_class = self._class_container
        else:
            out_class = value.__class__
        out = []
        for val in value:
            try:
                out += [self.prop.validate(instance, val)]
            except ValueError:
                self.error(instance, val, extra='This item is invalid.')
        return out_class(out)
419143
function addValueToList(list, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == value) {
            return false;
        }
    }
    list.push(value);
    return true;
}
1061906
def index(self, value):
        

        for i, x in enumerate(self):
            if x == value:
                return i

        raise ValueError("{} is not in list".format(value))
99895
public boolean containsValue(Object value) throws ObjectManagerException {
        if (getRoot() != null)
            return containsValue(getRoot(), value);
        return false;
    }
1087112
public boolean containsValue(final Object value)
    {
        final Object val = mapNullValue(value);
        boolean found = false;
        if (val != null)
        {
            final Object[] entries = this.entries;
            final int length = entries.length;

            for (int valueIndex = 1; valueIndex < length; valueIndex += 2)
            {
                if (val == entries[valueIndex] || val.equals(entries[valueIndex]))
                {
                    found = true;
                    break;
                }
            }
        }

        return found;
    }
806604
public boolean containsValue(Object value) {
        Entry tab[] = table;
        
        if (value==null) {
            for (int i = tab.length ; i-- > 0 ;) {
                for (Entry e = tab[i] ; e != null ; e = e.next) {
                    if (e.value == null) {
                        return true;
                    }
                }
            }
        } 
        else {
            for (int i = tab.length ; i-- > 0 ;) {
                for (Entry e = tab[i] ; e != null ; e = e.next) {
                    if (value.equals(e.value)) {
                        return true;
                    }
                }
            }
        }
        
        return false;
    }
1270090
def match(self, item):
        
        val = getattr(item, self._name) or False
        return bool(val) is self._value
462295
def _validate(self, val):
        
        if not self.check_on_set:
            self._ensure_value_is_in_objects(val)
            return

        if not (val in self.objects or (self.allow_None and val is None)):
            # CEBALERT: can be called before __init__ has called
            # super's __init__, i.e. before attrib_name has been set.
            try:
                attrib_name = self.name
            except AttributeError:
                attrib_name = ""

            items = []
            limiter = ']'
            length = 0
            for item in self.objects:
                string = str(item)
                length += len(string)
                if length < 200:
                    items.append(string)
                else:
                    limiter = ', ...]'
                    break
            items = '[' + ', '.join(items) + limiter
            raise ValueError("%s not in Parameter %s's list of possible objects, "
                             "valid options include %s"%(val,attrib_name, items))
543662
def issuperset(self, items):
        
        return all(_compat.map(self._seen.__contains__, items))
3002
def check(self, obj, value, errors):
        
        fieldname = "%s.%s" % (type(obj).__name__, self._name)

        if value is None:
            if not self._null:
                errors.append("%s may not be 'null'" % fieldname)

            # If None, just leave. The rest of checks don't make any sense.
            return

        for has_error in [self._has_wrong_type, self._has_wrong_length,
                          self._is_not_one_of, self._has_subproblems]:
            if has_error(fieldname, value, errors):
                break
759081
def value_contains(self, value, attribute):
        
        for item in self[attribute]:
            if value in item:
                return True
        return False