Package cn.sliew.milky.common.explain
Class Explanation
- java.lang.Object
-
- cn.sliew.milky.common.explain.Explanation
-
public class Explanation extends Object
Expert: Describes the .
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DESCRIPTIONstatic StringDEFAULT_NAME
-
Constructor Summary
Constructors Constructor Description Explanation()Explanation(String name)Explanation(String name, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwablecause()The throwable reason, maybe null.Explanationcause(Throwable cause)longcost()The time cost.Explanationcost(long cost)Stringdescription()A description of this explanation node.Explanationdescription(String description)Explanation[]details()The sub-nodes of this explanation node.booleanequals(Object o)inthashCode()Stringname()A name of this explanation node.Explanationname(String name)StringtoString()Render an explanation as text.ExplanationwithDetail(Explanation... details)
-
-
-
Field Detail
-
DEFAULT_NAME
public static final String DEFAULT_NAME
- See Also:
- Constant Field Values
-
DEFAULT_DESCRIPTION
public static final String DEFAULT_DESCRIPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public String name()
A name of this explanation node.
-
name
public Explanation name(String name)
-
cost
public long cost()
The time cost.
-
cost
public Explanation cost(long cost)
-
description
public String description()
A description of this explanation node.
-
description
public Explanation description(String description)
-
cause
public Throwable cause()
The throwable reason, maybe null.
-
cause
public Explanation cause(Throwable cause)
-
details
public Explanation[] details()
The sub-nodes of this explanation node.
-
withDetail
public Explanation withDetail(Explanation... details)
-
toString
public String toString()
Render an explanation as text.
-
-