package org.hccp.pdf;
/**
* PDF provides boolean objects with values true and false. The keywords true and
* false represent these values. This object is a wrapper around Java boolean
* primitives that return the corresponding PDF keyword as a String.
**/
public class BooleanObject implements DocumentObject {
private boolean value;
public final String TRUE = "true";
public final String FALSE = "false";
public BooleanObject(boolean flag) {
value = flag;
}
/**
* Returns the corresponding String representation of true or false.
*
* @return the corresponding String for the wrapped boolean primitive.
**/
public String getValue() {
if(value) {
return TRUE;
} else {
return FALSE;
}
}
}