com.sun.pdfview

## Class Flag

- java.lang.Object
- - com.sun.pdfview.Flag

    public class Flag
    extends java.lang.Object

A generic synchronized flag, because Java doesn't have one.

### Constructor Summary

Constructors
Constructor and Description
`Flag()`

### Method Summary

Methods
`void` `clear()` Clears the flag.
`void` `interruptibleWaitForFlag()` Waits for the flag to be set, if it is not set already.
`void` `set()` Sets the flag.
`void` `waitForFlag()` Waits for the flag to be set, if it is not set already.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Flag

    public Flag()

### Method Detail

#### set

    public void set()

Sets the flag. Any pending waitForFlag calls will now return.

#### clear

    public void clear()

Clears the flag. Do this before calling waitForFlag.

#### waitForFlag

    public void waitForFlag()

Waits for the flag to be set, if it is not set already. This method catches InterruptedExceptions, so if you want notification of interruptions, use interruptibleWaitForFlag instead.

#### interruptibleWaitForFlag

    public void interruptibleWaitForFlag()
                                  throws java.lang.InterruptedException

Waits for the flag to be set, if it is not set already.

Throws:
  `java.lang.InterruptedException`