class SimpleTerminalResizeListener implements TerminalResizeListener {

    boolean wasResized;
    TerminalSize lastKnownSize;

    /**
     * Creates a new SimpleTerminalResizeListener
     * @param initialSize Before any resize event, this listener doesn't know the size of the terminal. By supplying a
     * value here, you control what getLastKnownSize() will return if invoked before any resize events has reached us.
     */
    public SimpleTerminalResizeListener(TerminalSize initialSize) {
        this.wasResized = false;
        this.lastKnownSize = initialSize;
    }
    
    /**
     * Checks if the terminal was resized since the last time this method was called. If this is the first time calling
     * this method, the result is going to be based on if the terminal has been resized since this listener was attached
     * to the Terminal.
     * 
     * @return true if the terminal was resized, false otherwise
     */
    public synchronized boolean isTerminalResized() {<FILL_FUNCTION_BODY>}

    /**
     * Returns the last known size the Terminal is supposed to have.
     * 
     * @return Size of the terminal, as of the last resize update
     */
    public TerminalSize getLastKnownSize() {
        return lastKnownSize;
    }
    
    @Override
    public synchronized void onResized(Terminal terminal, TerminalSize newSize) {
        this.wasResized = true;
        this.lastKnownSize = newSize;
    }
    
}

        if(wasResized) {
            wasResized = false;
            return true;
        }
        else {
            return false;
        }
    
<no_super_class>