com.arsdigita.util
Class TypedText

java.lang.Object
  extended bycom.arsdigita.util.TypedText

public class TypedText
extends Object

A general utility class for text which carries additional type information. Specifically, we recognize plain text, HTML, and preformatted text.

Author:
Kevin Scaldeferri

Field Summary
static String TEXT_HTML
           
static String TEXT_PLAIN
           
static String TEXT_PREFORMATTED
           
static String versionId
           
 
Constructor Summary
TypedText(String text, String type)
           
 
Method Summary
 boolean equals(Object o)
          Returns true if the text and type are both equal
 String getHTMLText()
          Generates a version of the text renderable as HTML based on the type.
 String getText()
           
 String getType()
           
 int hashCode()
           
 void setText(String text)
           
 void setType(String type)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

TEXT_HTML

public static final String TEXT_HTML
See Also:
Constant Field Values

TEXT_PLAIN

public static final String TEXT_PLAIN
See Also:
Constant Field Values

TEXT_PREFORMATTED

public static final String TEXT_PREFORMATTED
See Also:
Constant Field Values
Constructor Detail

TypedText

public TypedText(String text,
                 String type)
Method Detail

getText

public String getText()

setText

public void setText(String text)

getType

public String getType()

setType

public void setType(String type)

getHTMLText

public String getHTMLText()
Generates a version of the text renderable as HTML based on the type.


equals

public boolean equals(Object o)
Returns true if the text and type are both equal


hashCode

public int hashCode()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC