Package jenkins.util
Class TreeString
- java.lang.Object
-
- jenkins.util.TreeString
-
- All Implemented Interfaces:
Serializable
public final class TreeString extends Object implements Serializable
TreeStringis 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.)TreeStringcan be built withTreeStringBuilder.- Since:
- 1.473
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTreeString.ConverterImplDefaultConverterimplementation for XStream that does interning scoped to one unmarshalling.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object rhs)inthashCode()booleanisBlank()static TreeStringof(String s)Creates aTreeString.StringtoString()Returns the full string representation.static StringtoString(TreeString t)
-
-
-
Method Detail
-
toString
public String toString()
Returns the full string representation.
-
isBlank
public boolean isBlank()
-
toString
public static String toString(TreeString t)
-
of
public static TreeString of(String s)
Creates aTreeString. Useful if you need to create one-offTreeStringwithoutTreeStringBuilder. Memory consumption is still about the same tonew String(s).- Returns:
- null if the parameter is null
-
-