code: protected void checkRestrictions(R value, D bean)
  	{
  		Integer max = this.maxCardinalities.get(value.getClass());
  		if (max != null)
  		{
  			if (max == 0)
  			{
  				throw new IllegalBioPAXArgumentException("Cardinality 0 restriction violated");
  			} else
  			{
  				assert multipleCardinality;
  				Set values = this.getValueFromBean(bean);
  				if (values.size() >= max)
  				{
  					throw new IllegalBioPAXArgumentException("Cardinality " + max + " restriction violated");
  				}
  			}
  		}
  	}
docs: Checks if the <em>bean</em> and the <em>value</em> are consistent with the cardinality rules of
  the model. This method is important for validations.
  @param value Value that is related to the object
  @param bean Object that is related to the value