Utility method for set once methods.
193090
private void isInitialized(boolean condition, String propName) {
        if (condition == true) {
            IllegalStateException e = new IllegalStateException("J2CGlobalConfigProperties: internal error.  Set once property already set.");
            Tr.error(tc, "SET_ONCE_PROP_ALREADY_SET_J2CA0159", (Object) null);
            throw e;
        }
    }
185287
def set_to(cls, name, num):
        """"""
        if num < 0:
            raise CounterValueError('Counter[%s] can not be set to %s' % (
                                    name, num))
        else:
            counter = cls.collection.find_and_modify(
                {'name': name},
                {'$set': {'seq': num}},
                new=True,
                upsert=True
            )
            return counter['seq']
42854
function once(eventName, handler, context, args) {
    this.on(eventName, handler, context, args, true);
}
17832
public static <T> Set<T> toSet(Iterator<T> self) {
        Set<T> answer = new HashSet<T>();
        while (self.hasNext()) {
            answer.add(self.next());
        }
        return answer;
    }
694927
def set(self, instance, value, **kw):
        
        return self._set(instance, value, **kw)
1027838
function once(fun) {
    var emitted = false, result;
    return function () {
        if (emitted)
            return result;
        emitted = true;
        return result = fun.apply(null, arguments);
    };
}
133467
function onceReady(error, methods) {
      this.debug(error ? 'No methods (%d) found, unable to connect to %s.' : 'onceReady: Found %d methods on %s.', ( methods ? methods.length : 0 ), this.get('url'));

      // Set Methods.
      this.set('methods', this.common.trim(methods));

      if (error) {
        this.emit('error', error, this);
      }

      this.emit('connected', error, this);

      // @chainable
      return this;

    }
56299
public TupleCombinerBuilder once( Stream<TupleRef> tupleRefs)
    {
    tupleRefs.forEach( tupleRef -> tupleCombiner_.addOnceTuple( tupleRef));
    return this;
    }
1152379
def mset(self, values):
        
        for key, value in values.items():
            self.set(key, value)
1116129
def _fromset(cls, values, key=None):
        """"""
        sorted_set = object.__new__(cls)
        sorted_set._set = values  # pylint: disable=protected-access
        sorted_set.__init__(key=key)
        return sorted_set
112355
def once(dispatcher, event, handle, *args):
    

    def shell(dispatcher, *args):
        try:
            handle(dispatcher, *args)
        except Exception as e:
            raise e
        finally:
            dispatcher.del_map(event, shell)
    dispatcher.add_map(event, shell, *args)
1143501
def once(self, event, callback):
        ''
        self._once_events.add(event)
        self.on(event, callback)
447785
def update(self, *iterables):
        """"""
        _set = self._set
        values = set(chain(*iterables))
        if (4 * len(values)) > len(_set):
            _list = self._list
            _set.update(values)
            _list.clear()
            _list.update(_set)
        else:
            _add = self.add
            for value in values:
                _add(value)
        return self
89432
def as_set(self, include_weak=False):
        """"""
        rv = set(self._strong)
        if include_weak:
            rv.update(self._weak)
        return rv
1197771
public <T> Set<T> toSet(Class<T> classOfT) {
        return toSet(classOfT, null);
    }
361877
function set(name, element, previous, props) {
  if (set.handlers[name]) {
    set.handlers[name](name, element, previous, props);
  } else if (previous[name] !== props[name]) {
    element[name] = props[name];
  }
}
717658
public static MethodInstance getSetter(Object obj, String prop, Object value) throws NoSuchMethodException {
	prop = "set" + StringUtil.ucFirst(prop);
	MethodInstance mi = getMethodInstance(obj, obj.getClass(), prop, new Object[] { value });
	Method m = mi.getMethod();

	if (m.getReturnType() != void.class)
	    throw new NoSuchMethodException("invalid return Type, method [" + m.getName() + "] must have return type void, now [" + m.getReturnType().getName() + "]");
	return mi;
    }