Package jenkins.util
Class TreeString
- java.lang.Object
-
- jenkins.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 withTreeStringBuilder
.- Since:
- 1.473
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TreeString.ConverterImpl
DefaultConverter
implementation for XStream that does interning scoped to one unmarshalling.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object rhs)
int
hashCode()
boolean
isBlank()
static TreeString
of(String s)
Creates aTreeString
.String
toString()
Returns the full string representation.static String
toString(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-offTreeString
withoutTreeStringBuilder
. Memory consumption is still about the same tonew String(s)
.- Returns:
- null if the parameter is null
-
-