Assigns the specified object the specified count in the set.
@param o The object to be added or updated in the set.
@param c The count of the specified object.
542535
public void setCount(Object o,int c) {
    int[] nums = (int[]) cset.get(o);
    if (nums != null) {
      nums[0] = c;
    }
    else {
      cset.put(o,new int[]{c,1});
    }
  }
1090452
public void setValue(String k, Object o) {
	if (values == null) {
	    values = new Hashtable<String, Object>();
	}
	values.put(k, o);
    }
309171
public boolean add(SatConstraintBuilder c) {
        if (this.builders.containsKey(c.getIdentifier())) {
            return false;
        }
        this.builders.put(c.getIdentifier(), c);
        return true;
    }
928601
@Override
	public boolean addAll(Collection<? extends Integer> c) {
		Iterator<? extends Integer> iter=c.iterator();
		boolean didOne=false;
		while(iter.hasNext()) {
			add(iter.next().intValue());
			didOne=true;
		}
		return didOne;
	}
1243108
private void assign(final Object val,
                             final Element el,
                             final Collection<Object> col,
                             final Object o,
                             final Method meth) throws Throwable {
    if (col != null) {
      col.add(val);
    } else if (!cb.save(el, o, val)) {
      final Object[] pars = new Object[]{val};

      meth.invoke(o, pars);
    }
  }
1132989
private static void getCounts(BaseArray T, BaseArray C, int n, int k) {
        for (int i = 0; i < k; ++i) {
            C.set(i, 0);
        }
        for (int i = 0; i < n; ++i) {
            C.update(T.get(i), 1);
        }
    }
632240
@Override
    public void write(int c) throws IOException {
    	for(OutputStream os : oss) {
    		os.write(c);
    	}
    }
784875
@Override
  public void write (final int c)
  {
    final int nNewCount = m_nCount + 1;
    if (nNewCount > m_aBuf.length)
      m_aBuf = Arrays.copyOf (m_aBuf, Math.max (m_aBuf.length << 1, nNewCount));
    m_aBuf[m_nCount] = (char) c;
    m_nCount = nNewCount;
  }
941198
public final void setToOne(int c) {
        if( 0x10ffff<c) {
            return;
        }

        if(c<0xffff) {
            bmpLength=length=2;
            array[0]=(char)c;
            array[1]=(char)(c+1);
        } else if(c==0xffff) {
            bmpLength=1;
            length=3;
            array[0]=0xffff;
            array[1]=1;
            array[2]=0;
        } else if(c<0x10ffff) {
            bmpLength=0;
            length=4;
            array[0]=(char)(c>>16);
            array[1]=(char)c;
            ++c;
            array[2]=(char)(c>>16);
            array[3]=(char)c;
        } else /* c==0x10ffff */ {
            bmpLength=0;
            length=2;
            array[0]=0x10;
            array[1]=0xffff;
        }
    }
412075
@Override
	public int countByC_K(long CPDefinitionOptionRelId, String key) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_C_K;

		Object[] finderArgs = new Object[] { CPDefinitionOptionRelId, key };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(3);

			query.append(_SQL_COUNT_CPDEFINITIONOPTIONVALUEREL_WHERE);

			query.append(_FINDER_COLUMN_C_K_CPDEFINITIONOPTIONRELID_2);

			boolean bindKey = false;

			if (key == null) {
				query.append(_FINDER_COLUMN_C_K_KEY_1);
			}
			else if (key.equals("")) {
				query.append(_FINDER_COLUMN_C_K_KEY_3);
			}
			else {
				bindKey = true;

				query.append(_FINDER_COLUMN_C_K_KEY_2);
			}

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(CPDefinitionOptionRelId);

				if (bindKey) {
					qPos.add(key);
				}

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
1013997
public void incrementCount(List<K> l, K o, double count) {
    if (l.size() != depth - 1) {
      wrongDepth();
    }

    GeneralizedCounter<K> next = this;
    for (K o2: l) {
      next.addToTotal(count);
      next = next.conditionalizeHelper(o2);
    }
    next.addToTotal(count);

    next.incrementCount1D(o, count);
  }
1266823
public void set(XEvent o) {
		list.remove(position);
		list.add(position, o);
	}
1250014
public void add(Counter<? extends G> c) {
        for (Map.Entry<? extends G,Integer> e : c) {
            count(e.getKey(), e.getValue());
        }
    }
911191
public void assign(Iterable<?> source) {
        clear();
        int i = 0;
        
        for (Object value : source) {
            values.put(Integer.toString(++i), value);
        }
    }
315489
public void set(String name, Object o){
        Map<String,Object> m = getMap(name);
        if(m!=null) {
            memoryHeap.release(m.get(name));
            m.put(name, o);
            memoryHeap.take(m.get(name));
        }
    }
7383
public boolean add(Object o) {
		try {
			this.addElement((Element) o);
			return true;
		}
		catch(ClassCastException cce) {
			throw new ClassCastException("You can only add objects that implement the Element interface.");
		}
		catch(BadElementException bee) {
			throw new ClassCastException(bee.getMessage());
		}
	}
594809
@Override
    public final void put(Object o) {
        boolean discarded = false;

        if (inactive) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "setting active: " + this);

            // If the pool was marked inactive by the pool manager alarm, then
            // switch it back to active.  Hopefully this happens before too
            // many other threads notice and cause contention with the
            // following sync block.
            inactive = false;

            // If this pool has been inactive long enough to be marked
            // unmanaged, then add it back as managed again.
            synchronized (this) {
                if (!ivManaged) {
                    poolMgr.add(this);
                    ivManaged = true;
                }
            }
        }

        discarded = !buffer.pushWithLimit(o, poolSize.maxSize);

        if (discarded) {
            if (discardStrategy != null) {
                discardStrategy.discard(o);
            }
        }

        if (beanPerf != null) { // Update PMI data
            beanPerf.objectReturn(buffer.size(), discarded);
        }
    }