Package java.lang

Examples of java.lang.IllegalArgumentException


      if (ptr.greaterThan(name))  // bucket is not present
    break;
  }

  throw(new IllegalArgumentException("Bucket name "+name+" not found."));
    }
View Full Code Here


      */   
     
public void setValue (double value) throws IllegalArgumentException
    {
  if ((value < minIndex) || (value > maxIndex))
      throw(new IllegalArgumentException("Value "+value+" is beyond histogram range [ "+minIndex+", "+maxIndex+" ]"));

  for (Bucket ptr = Head; ptr != null; ptr = ptr.cdr())
  {
      double bucketValue = ptr.Name();

      if ((value == bucketValue) || (value <= bucketValue + width))
      {
    super.setValue(ptr.Name());
    return;
      }
  }

  // shouldn't get here!!

  throw(new IllegalArgumentException("Something went wrong with "+value));
}
View Full Code Here

      */
   
public double sizeByName (double name) throws IllegalArgumentException
    {
  if ((name < minIndex) || (name > maxIndex))
      throw(new IllegalArgumentException("Argument out of range."));

  for (Bucket ptr = Head; ptr != null; ptr = ptr.cdr())
  {
      double bucketValue = ptr.Name();

      if ((name == bucketValue) || (name <= bucketValue + width))
    return ptr.size();
  }

  throw(new IllegalArgumentException("Name "+name+" out of range."));
    }
View Full Code Here

public Quantile (double q) throws IllegalArgumentException
    {
  qProb = q;

  if ((q <= 0.0) || (q > 1.0))
      throw(new IllegalArgumentException("Quantile::Quantile ( "+q+" ) : bad value."));
    }
View Full Code Here

   */
  public synchronized void registerPool(String name, ConnectionPool pool)
  {
    if ( m_poolTable.containsKey(name) )
    {
      throw new IllegalArgumentException("Pool already exists");
    }

    m_poolTable.put(name, pool);
  }
View Full Code Here

   */
  public synchronized void registerPool( String name, ConnectionPool pool )
  {
    if ( m_poolTable.containsKey(name) )
    {
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_POOL_EXISTS, null)); //"Pool already exists");
    }

    m_poolTable.put(name, pool);
  }
View Full Code Here

    public void setErrorListener(ErrorListener listener)
  throws IllegalArgumentException {
        if (listener == null) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
          "Transformer");
            throw new IllegalArgumentException(err.toString());
  }
        _errorListener = listener;
    }
View Full Code Here

     */
    public String getOutputProperty(String name)
  throws IllegalArgumentException {
  if (!validOutputProperty(name)) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name);
      throw new IllegalArgumentException(err.toString());
  }
  return(_properties.getProperty(name));
    }
View Full Code Here

     */
    public void setOutputProperty(String name, String value)
  throws IllegalArgumentException {
  if (!validOutputProperty(name)) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name);
      throw new IllegalArgumentException(err.toString());
  }
  _properties.setProperty(name, value);
    }
View Full Code Here

    public void setErrorListener(ErrorListener listener)
  throws IllegalArgumentException {
        if (listener == null) {
      ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
          "Transformer");
            throw new IllegalArgumentException(err.toString());
  }
        _errorListener = listener;
    }
View Full Code Here

TOP

Related Classes of java.lang.IllegalArgumentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.