package w3c.wai.parser.html4.struct.table;
import java.io.*;

class Caption {
  private boolean top;
  private String value=null;

  public Caption(boolean top,
		 String value) {
    this.top=top;
    this.value=value;
  }

  public Caption() {
      top=true;
      value=new String();
  }

  protected void setCaption(boolean top) {
    this.top=top;
  }
  
  protected void setCaption(String value) {
    this.value=value;
  }
  
  protected void setTop(boolean top) {
    this.top=top;
  }
  
  protected void setValue(String value) {
    this.value=value;
  }
  
  public String toString() {
    return "top: "+(top==true?"true":"false") + "\tvalue: " + value;
  }

    public void print(BufferedWriter fw) throws IOException {
      fw.write("Caption: "+value+"\n");
	fw.flush();
    }
    
    public boolean getTop() {
	return top;
    }
    
    public String getValue() {
	return value;
    }

    public boolean isNull() {
      return value.equals("");
    }
    
}
