public class LoggableValue extends java.lang.Object implements java.lang.Comparable<LoggableValue>
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
UNSET_DISPLAY_KEY_NAME |
Constructor and Description |
---|
LoggableValue(java.lang.String valueWebStyle,
java.lang.String typeName,
java.lang.String displayValue,
java.util.Collection<?> children)
Creates a new loggable value
|
LoggableValue(java.lang.String valueWebStyle,
java.lang.String typeName,
java.lang.String displayValue,
java.util.Map<java.lang.String,?> children)
Creates a new loggable value
|
Modifier and Type | Method and Description |
---|---|
void |
accept(LoggableVisitor visitor) |
int |
compareTo(LoggableValue other) |
boolean |
equals(java.lang.Object o) |
java.util.List<LoggableValue> |
getChildren() |
java.lang.String |
getDisplayKeyName() |
java.lang.String |
getDisplayValue() |
java.lang.String |
getTypeName() |
java.lang.String |
getValueWebStyle() |
int |
hashCode() |
void |
setDisplayKeyName(java.lang.String displayKeyName) |
void |
setHideChildren(boolean hideChildren) |
boolean |
shouldHideChildren() |
static final java.lang.String UNSET_DISPLAY_KEY_NAME
public LoggableValue(@NotNull java.lang.String valueWebStyle, @NotNull java.lang.String typeName, @NotNull java.lang.String displayValue, @Nullable java.util.Map<java.lang.String,?> children)
valueWebStyle
- The styling for the value display in the web interfacetypeName
- The name of the type of data (for example, could just be Map). This is general the class namedisplayValue
- The actual data to display. If something other than a primitive, null, or string is used here, then it will be converted if possible
to a friendlier log formatchildren
- A collection of children of this element (mapped by key -> value). These values will be converted automatically to a pretty format if possiblepublic LoggableValue(@NotNull java.lang.String valueWebStyle, @NotNull java.lang.String typeName, @NotNull java.lang.String displayValue, @Nullable java.util.Collection<?> children)
valueWebStyle
- The styling for the value display in the web interfacetypeName
- The name of the type of data (for example, could just be Map). This is general the class namedisplayValue
- The actual data to display. If something other than a primitive, null, or string is used here, then it will be converted if possible
to a friendlier log formatchildren
- A collection of children of this element, in the order to display them. These values will be converted automatically to a pretty format if possiblepublic boolean shouldHideChildren()
public void setHideChildren(boolean hideChildren)
public void setDisplayKeyName(@NotNull java.lang.String displayKeyName)
@NotNull public java.lang.String getDisplayKeyName()
@NotNull public java.lang.String getTypeName()
@NotNull public java.lang.String getDisplayValue()
@NotNull public java.util.List<LoggableValue> getChildren()
@NotNull public java.lang.String getValueWebStyle()
public void accept(@NotNull LoggableVisitor visitor)
public int compareTo(@NotNull LoggableValue other)
compareTo
in interface java.lang.Comparable<LoggableValue>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object