Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.InvalidStateException


                    + (h * ((k[0] * _B[2][0]) + (k[1] * _B[2][1]) + (k2 * _B[2][2])));
            integrator.setTentativeState(outvalue);
            break;

        default:
            throw new InvalidStateException(this,
                    "execution sequence out of range.");
        }

        integrator.output.broadcast(new DoubleToken(outvalue));
    }
View Full Code Here


                // for BrowserTableaus, but there is not much to be done
                // about it since we do not have a platform independent way
                // of communicating with the browser that we invoke.
                setContainer(null);
            } catch (KernelException ex2) {
                throw new InvalidStateException((Nameable) null, ex2,
                        "setContainer(null) failed, url was " + url);
            }
        } catch (IOException ex) {
            throw new InvalidStateException((Nameable) null, ex,
                    "Failed to handle '" + url + "': ");
        }
    }
View Full Code Here

     @exception NoTokenException If there is no token.
     *  @exception InvalidStateException If the status is unknown.
     */
    public Token get() throws NoTokenException {
        if (!isKnown()) {
            throw new InvalidStateException(
                    "FixedPointReceiver: get() called on an "
                            + "FixedPointReceiver " + "with status unknown.");
        }
        if (_token == null) {
            throw new NoTokenException(
View Full Code Here

     */
    public boolean hasToken() {
        if (isKnown()) {
            return (_token != null);
        } else {
            throw new InvalidStateException(getContainer(),
                    "hasToken() called on FixedPointReceiver with "
                            + "unknown status.");
        }
    }
View Full Code Here

     @see #hasToken()
     @exception InvalidStateException If the status is unknown.
     */
    public boolean hasToken(int numberOfTokens) {
        if (!isKnown()) {
            throw new InvalidStateException(getContainer(), "hasToken(int)"
                    + " called on FixedPointReceiver with unknown status.");
        }
        if (numberOfTokens < 1) {
            throw new IllegalArgumentException(
                    "FixedPointReceiver: hasToken(int) requires a "
View Full Code Here

     @return The index of the minimum bucket.
     */
    private int _getIndexOfMinimumBucket() {
        // First check whether the queue is empty.
        if (_queueSize == 0) {
            throw new InvalidStateException("Queue is empty.");
        }

        // If the queue has not been changed, do nothing.
        // Note that this has a strong dependency on the implementation
        // of methods that modify the queue, such as the put(), remove(),
View Full Code Here

        while (relations.hasNext()) {
            IORelation relation = (IORelation) relations.next();

            if (relation != except) {
                if (!relation.isWidthFixed()) {
                    throw new InvalidStateException(this,
                            "Width of inside relations cannot "
                                    + "be determined.");
                }

                result += relation.getWidth();
View Full Code Here

        while (relations.hasNext()) {
            IORelation relation = (IORelation) relations.next();

            if (relation != except) {
                if (!relation.isWidthFixed()) {
                    throw new InvalidStateException(this,
                            "Width of outside relations cannot "
                                    + "be determined.");
                }

                result += relation.getWidth();
View Full Code Here

                } catch (IndexOutOfBoundsException ex) {
                    return _EMPTY_RECEIVER_ARRAY;
                }

                if (result.length != width) {
                    throw new InvalidStateException(this,
                            "getReceivers(IORelation, int): "
                                    + "Invalid receivers. "
                                    + "Need to call createReceivers().");
                }
            }
View Full Code Here

            }

            break;

        default:
            throw new InvalidStateException(
                    "Invalid value for _function private variable. "
                            + "Round actor (" + getFullName() + ")"
                            + " on function type " + _function);
        }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.InvalidStateException

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.