KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > value > BooleanValue


1 package org.apache.slide.projector.value;
2
3
4 public class BooleanValue implements PrintableValue {
5     public final static BooleanValue TRUE = new BooleanValue(true);
6     public final static BooleanValue FALSE = new BooleanValue(false);
7
8     private boolean booleanValue;
9
10     public final static String JavaDoc CONTENT_TYPE = Boolean JavaDoc.class.getName();
11
12     public BooleanValue(boolean booleanValue) {
13         this.booleanValue = booleanValue;
14     }
15
16     public boolean booleanValue() {
17         return booleanValue;
18     }
19
20     public String JavaDoc getContentType() {
21         return CONTENT_TYPE;
22     }
23
24     public String JavaDoc toString() {
25         return String.valueOf(booleanValue);
26     }
27
28     public StringBuffer JavaDoc print(StringBuffer JavaDoc buffer) {
29         return buffer.append(booleanValue);
30     }
31 }
Popular Tags