Test if given map size has a specified value.

@param parameter invocation map parameters,
@param size requested size,
@param name the name of invocation parameter.
@throws IllegalArgumentException if map has not requested size.
510045
public static void size(Map<?, ?> parameter, int size, String name) throws IllegalArgumentException {
		if (parameter.size() != size) {
			throw new IllegalArgumentException(String.format("%s size is not %d.", name, size));
		}
	}
866436
public org.grails.datastore.mapping.query.api.Criteria sizeEq(String propertyName, int size) {
        if (!validateSimpleExpression()) {
            throwRuntimeException(new IllegalArgumentException("Call to [sizeEq] with propertyName [" +
                    propertyName + "] and size [" + size + "] not allowed here."));
        }

        propertyName = calculatePropertyName(propertyName);
        addToCriteria(Restrictions.sizeEq(propertyName, size));
        return this;
    }
1252979
public static void checkResourceName(String name) {
        if (name == null || (!name.isEmpty() && !name.matches("^[a-zA-Z0-9_;\\-\\.\\[\\]\\(\\)]+$"))) {
            throw new IllegalArgumentException("name(" + name + ") contains illegal character, must be (a-z,A-Z,0-9,_,.,(,),-,[,])");
        }
    }
1331690
@Override
    public String getParameter(String name) {
        String[] vals = getParameterMap().get(name);

        return (vals != null && vals.length > 0) ? vals[0] : null;
    }
1303804
protected void verifyParameterLegality(Parameter... parameters) {
    for (Parameter parameter : parameters)
      if (illegalParamNames.contains(parameter.name)) {
        throw new IllegalArgumentException(
                "Parameter '" + parameter.name + "' is reserved for RestFB use - you cannot specify it yourself.");
      }
  }
1346659
public static void containsNoNulls( Iterable<?> argument,
                                        String name ) {
        isNotNull(argument, name);
        int i = 0;
        for (Object object : argument) {
            if (object == null) {
                throw new IllegalArgumentException(CommonI18n.argumentMayNotContainNullValue.text(name, i));
            }
            ++i;
        }
    }
380085
public SIBUuid8 mapMeNameToUuid(String name) {
        SIBUuid8 result = null;

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "mapMeNameToUuid", name);

        // Be tolerant of bad args
        if (name != null) {
            // First, short circuit the local ME
            if (name.equals(getMessagingEngineName()))
                result = getMessagingEngineUuid();
            else
                ;// Venu liberty change. Here the code was going to TrmMeMain
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "mapMeNameToUuid", result);

        return result;
    }
990631
public static void notNull(final Object arg, final String name) {
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
    }
275579
public boolean contains(String name)
    {
        Part part = (Part)_partMap.get(name);
        return (part!=null);
    }
497311
public static void instanceOf(final Object arg, final Class<?> clazz, final String name) {
        
        if(arg == null) {
            throw new IllegalArgumentException(String.format("%s should not be null.", name));
        }
        
        if(!clazz.isAssignableFrom(arg.getClass())) {
            throw new IllegalArgumentException(String.format("%s should not be class with '%s'.", name, clazz.getName()));
        }
        
    }
222270
public boolean hasParameter(String parameter) {
    if (info == null || info.parameters == null) {
      return false;
    }
    return info.parameters.containsKey(parameter);
  }
1099869
public static void containsKey( Map<?, ?> argument,
                                    Object key,
                                    String name ) {
        isNotNull(argument, name);
        if (!argument.containsKey(key)) {
            throw new IllegalArgumentException(CommonI18n.argumentDidNotContainKey.text(name, getObjectName(key)));
        }
    }
1250442
public void addParameter(NameValuePair param) 
    throws IllegalArgumentException {
        log.trace("enter PostMethod.addParameter(NameValuePair)");

        if (param == null) {
            throw new IllegalArgumentException("NameValuePair may not be null");
        }
        addParameter(param.getName(), param.getValue());
    }
53382
public static boolean exampleHasAtLeastOneCriteriaCheck(Object parameter) {
        if (parameter != null) {
            try {
                if (parameter instanceof Example) {
                    List<Example.Criteria> criteriaList = ((Example) parameter).getOredCriteria();
                    if (criteriaList != null && criteriaList.size() > 0) {
                        return true;
                    }
                } else {
                    Method getter = parameter.getClass().getDeclaredMethod("getOredCriteria");
                    Object list = getter.invoke(parameter);
                    if(list != null && list instanceof List && ((List) list).size() > 0){
                        return true;
                    }
                }
            } catch (Exception e) {
                throw new MapperException(SAFE_DELETE_ERROR, e);
            }
        }
        throw new MapperException(SAFE_DELETE_EXCEPTION);
    }
936579
private <T> void storeInMap(MultiValueMap<T> map, T key, String[] values) {
        try {
            map.set(key, values);
        } catch (Exception e) {
            throw new IllegalArgumentException(e);
        }
    }
1127177
public final void setToSize(int size) {
    
    Object newMap[] = new Object[size];
    
    System.arraycopy(m_map, 0, newMap, 0, m_firstFree);
    m_mapSize = size;

    m_map = newMap;
    
  }
596953
private void checkMapSize(LinkedHashMap<?, ?> map) {

        while (map.size() > CmsADEManager.DEFAULT_ELEMENT_LIST_SIZE) {
            map.remove(map.keySet().iterator().next());
        }
    }