hudson.plugins.analysis.util
Class TreeString

java.lang.Object
  extended by hudson.plugins.analysis.util.TreeString
All Implemented Interfaces:
Serializable

public final class TreeString
extends Object
implements Serializable

TreeString is an alternative string representation that saves the memory when you have a large number of strings that share common prefixes (such as various file names.)

TreeString can be built with TreeStringBuilder.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Nested Class Summary
static class TreeString.ConverterImpl
          Default Converter implementation for XStream that does interning scoped to one unmarshalling.
 
Method Summary
 boolean equals(Object rhs)
           
 int hashCode()
           
 boolean isBlank()
           
static TreeString of(String s)
          Creates a TreeString.
 String toString()
          Returns the full string representation.
static String toString(TreeString t)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(Object rhs)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns the full string representation.

Overrides:
toString in class Object

isBlank

public boolean isBlank()

toString

public static String toString(TreeString t)

of

public static TreeString of(String s)
Creates a TreeString. Useful if you need to create one-off TreeString without TreeStringBuilder. Memory consumption is still about the same to new String(s).

Returns:
null if the parameter is null


Copyright © 2004-2012 Hudson. All Rights Reserved.