org.sitemesh.content
Interface ContentChunk

All Known Subinterfaces:
ContentProperty

public interface ContentChunk

A mutable reference to a chunk of content.

Author:
Joe Walnes

Method Summary
 String getNonNullValue()
          Returns the value of this property as a String.
 Content getOwningContent()
          Returns the Content that this chunk belongs to.
 String getValue()
          Returns the value of this property as a String.
 boolean hasValue()
          Returns whether this property has a value set.
 void setValue(CharSequence value)
          Sets the value.
 void writeValueTo(Appendable out)
          Write the value of this property to out.
 

Method Detail

hasValue

boolean hasValue()
Returns whether this property has a value set.


getValue

String getValue()
Returns the value of this property as a String. If not set, will return null.


getNonNullValue

String getNonNullValue()
Returns the value of this property as a String. If not set, will return "".


writeValueTo

void writeValueTo(Appendable out)
                  throws IOException
Write the value of this property to out. This is typically more efficient than calling getValue() for large properties as it does not require copying into an intermediate String instance. If no value is set, nothing will be written.

Throws:
IOException

setValue

void setValue(CharSequence value)
Sets the value. May be null.


getOwningContent

Content getOwningContent()
Returns the Content that this chunk belongs to.



Copyright © 2011. All Rights Reserved.