⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invalidstateexception.java

📁 Java Telephony API .java程序
💻 JAVA
字号:
/*#pragma ident "@(#)InvalidStateException.java	1.4      97/01/22     SMI" * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved. * * Permission to use, copy, modify, and distribute this software * and its documentation for NON-COMMERCIAL purposes and without * fee is hereby granted provided that this copyright notice * appears in all copies. Please refer to the file "copyright.html" * for further important copyright and licensing information. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */package java.telephony;/** * The current state of the object on which the method exists is not an * acceptable pre-condition for the method. Each method which changes the * call model typically has a set of states in which the object must be * as a pre-condition for the method. Each method documents the pre-condition * states for objects. Typically, this method will succeed in the future * once the object in question has reached the proper state.  * <p> * This exception provides the application with the object in question and * the state it is currently in. */public class InvalidStateException extends Exception {  private int    _type;  private int    _state;  private Object _object;  /**   * The invalid object in question is the Provider   */  public static final int PROVIDER_OBJECT = 0;  /**   * The invalid object in question is the Call   */  public static final int CALL_OBJECT = 1;  /**   * The invalid object in question is the Connection   */  public static final int CONNECTION_OBJECT = 2;  /**   * The invalid object in question is the Terminal   */  public static final int TERMINAL_OBJECT = 3;  /**   * The invalid object in question is the Address   */  public static final int ADDRESS_OBJECT = 4;  /**   * The invalid object in question is the Terminal Connection   */  public static final int TERMINAL_CONNECTION_OBJECT = 5;  /**   * Constructor with no string.   */  public InvalidStateException(Object object, int type, int state) {    super();    _type   = type;    _object = object;    _state  = state;  }  /**   * Constructor which takes a string description.   */  public InvalidStateException(Object object, int type, int state, String s) {    super(s);    _type   = type;    _object = object;    _state = state;  }  /**   * Returns the type of object in question.   * <p>   * @return The type of object in question.   */  public int getObjectType() {    return _type;  }  /**   * Returns the object which has the incorrect state.   * <p>   * @return The object which is in the wrong state.   */  public Object getObject() {    return _object;  }  /**   * Returns the state of the object.   * <p>   * @return The state of the object.   */  public int getState() {    return _state;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -