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
.
Modifier and Type | Class and Description |
---|---|
static class |
TreeString.ConverterImpl
Default
Converter implementation for XStream that does interning
scoped to one unmarshalling. |
Modifier and Type | Method and Description |
---|---|
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) |
public String toString()
public boolean isBlank()
public static String toString(TreeString t)
public static TreeString of(String s)
TreeString
. Useful if you need to create one-off
TreeString
without TreeStringBuilder
. Memory consumption
is still about the same to new String(s)
.Copyright © 2004–2021. All rights reserved.