Overloads the << operator to put the new item into the correct list.
This allows one to simply call env << <valid_object> instead of
having to choose a specific list, such as objects or environmental factors.
337519
def <<(item)
    if(item.kind_of? Zyps::GameObject)
      self.add_object(item)
    elsif(item.kind_of? Zyps::EnvironmentalFactor)
      self.add_environmental_factor(item)
    else
      raise "Invalid item: #{item.class}" 
    end
    self
  end
1215105
private void insanityCheck(Element element, Meta meta, Opcode.Type type) {
		if (meta != null) {
			throw new TemplateException("Invalid operators list on element |%s|. Only one %s operator is allowed.", element, type);
		}
	}
1366943
function overrideExistsForOperator(operator) {
            return options.overrides && Object.prototype.hasOwnProperty.call(options.overrides, operator);
        }
700051
def _check_operators(self):
        

        if not isinstance(self._operators, (list, tuple, np.ndarray)):
            raise TypeError(('Input operators must be provided as a list, '
                             'not {}').format(type(self._operators)))

        for op in self._operators:
            if not hasattr(op, 'cost'):
                raise ValueError('Operators must contain "cost" method.')
            op.cost = check_callable(op.cost)
476332
def append(self, item):
        
        validated_value = self.get_validated_object(item)
        if validated_value is not None:
            self.__modified_data__.append(validated_value)
1069243
def <<(item)
    if item.kind_of? Zyps::Location
      self.location = item
    elsif item.kind_of? Zyps::Color
      self.color = item
    elsif item.kind_of? Zyps::Vector
      self.vector = item
    else
      raise "Invalid item: #{item.class}"
    end
    self
  end
272260
function sanitizeOperatorPosition(opPosition) {
            opPosition = opPosition || OPERATOR_POSITION.before_newline;

            var validPositionValues = Object.values(OPERATOR_POSITION);

            if (!in_array(opPosition, validPositionValues)) {
                throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n" +
                    validPositionValues +
                    "\nYou passed in: '" + opPosition + "'");
            }

            return opPosition;
        }
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)
19934
function (args) {
  if (false === (this instanceof MemoryStore)) throw new Error('new operator required');
  args = args || {};
  this.storeType = args.storeType || "MemoryStore";
  this.name = args.name || 'a ' + this.storeType;
  this.storeProperty = {
    isReady: true,
    canGetModel: true,
    canPutModel: true,
    canDeleteModel: true,
    canGetList: true
  };
  this.data = [];// Each ele is an array of model types and contents (which is an array of IDs and Model Value Store)
  this.idCounter = 0;
  var unusedProperties = getInvalidProperties(args, ['name', 'storeType']);
  var errorList = [];
  for (var i = 0; i < unusedProperties.length; i++) errorList.push('invalid property: ' + unusedProperties[i]);
  if (errorList.length > 1) throw new Error('error creating Store: multiple errors');
  if (errorList.length) throw new Error('error creating Store: ' + errorList[0]);
}
342226
def list(name,
             loader = nil,
             enforce_element: @enforce_all_elements,
             enforce_values: true,
             exact_count: nil,
             max_count: nil,
             min_count: nil,
             required: nil,
             with_elements: false)

      enforce_element = required unless required.nil?
      enforce_element ||= exact_count && exact_count > 0 || min_count && min_count > 0
      loader = Proc.new if block_given?

      @touched = true

      unless @elements_associative.key?(name)
        if enforce_element
          raise Errors::Validation.missing_list(@context, name, @instruction)
        end

        return []
      end

      elements = @elements_associative[name]

      elements.each do |element|
        case element
        when List, Empty
          next
        when Field
          raise Errors::Validation.expected_list_got_field(@context, element.instruction)
        when Fieldset
          raise Errors::Validation.expected_list_got_fieldset(@context, element.instruction)
        when Section
          raise Errors::Validation.expected_list_got_section(@context, element.instruction)
        end
      end

      if elements.length > 1
        raise Errors::Validation.expected_list_got_lists(
          @context,
          name,
          elements.map(&:instruction)
        )
      end

      element = elements[0]
      element.touch

      count = element.is_a?(Empty) ? 0 : element.length

      if exact_count && count != exact_count
        raise Errors::Validation.exact_count_not_met(@context, element.instruction, exact_count)
      end

      if min_count && count < min_count
        raise Errors::Validation.min_count_not_met(@context, element.instruction, min_count)
      end

      if max_count && count > max_count
        raise Errors::Validation.max_count_not_met(@context, element.instruction, max_count)
      end

      if element.is_a?(Empty)
        []
      else
        element.items(loader, enforce_values: enforce_values, with_elements: with_elements)
      end
    end
1324110
def append(self, item, select=False):
        
        if item in self:
            raise ValueError("item %s already in list" % item)
        modeliter = self.model.append((item,))
        self._id_to_iter[id(item)] = modeliter
        if select:
            self.selected_item = item
        self.emit('item-added', item)
733671
function(where, name) {
                var orig = [][name];
                list.prototype[name] = function() {
                    // Get the items being added.
                    var args = [],
                        // Where we are going to add items.
                        len = where ? this.length : 0,
                        i = arguments.length,
                        res, val;

                    // Go through and convert anything to an `map` that needs to be converted.
                    while (i--) {
                        val = arguments[i];
                        args[i] = bubble.set(this, i, this.__type(val, i));
                    }

                    // Call the original method.
                    res = orig.apply(this, args);

                    if (!this.comparator || args.length) {

                        this._triggerChange("" + len, "add", args, undefined);
                    }

                    return res;
                };
            }
228723
def set_operator(self, operator):
        
        cairo.cairo_set_operator(self._pointer, operator)
        self._check_status()
1084932
def put(self, item):
        ''' 
        '''
        if isinstance(item, self._item_class):
            self._put_one(item)
        elif isinstance(item, (list, tuple)):
            self._put_many(item)
        else:
            raise RuntimeError('Unknown item(s) type, %s' % type(item))
877296
def object_type=(object_type)
      validator = EnumAttributeValidator.new('String', ["ITEM", "DISCOUNT", "CATEGORY", "PLACEHOLDER"])
      unless validator.valid?(object_type)
        fail ArgumentError, "invalid value for 'object_type', must be one of #{validator.allowable_values}."
      end
      @object_type = object_type
    end
643664
def append(self, item):
        
        self.check_insertion(item)

        self.real_list.append(item)
        self._items |= {item}
110260
def __validate_logical(self, operator, definitions, field, value):
        
        valid_counter = 0
        _errors = errors.ErrorList()

        for i, definition in enumerate(definitions):
            schema = {field: definition.copy()}
            for rule in ('allow_unknown', 'type'):
                if rule not in schema[field] and rule in self.schema[field]:
                    schema[field][rule] = self.schema[field][rule]
            if 'allow_unknown' not in schema[field]:
                schema[field]['allow_unknown'] = self.allow_unknown

            validator = self._get_child_validator(
                schema_crumb=(field, operator, i),
                schema=schema, allow_unknown=True)
            if validator(self.document, update=self.update, normalize=False):
                valid_counter += 1
            else:
                self._drop_nodes_from_errorpaths(validator._errors, [], [3])
                _errors.extend(validator._errors)

        return valid_counter, _errors