程序包 org.hamcrest
类 StringDescription
- java.lang.Object
- org.hamcrest.BaseDescription
- org.hamcrest.StringDescription
- 所有已实现的接口:
Description
public class StringDescription extends BaseDescription
ADescription
that is stored as a string.
嵌套类概要
从接口继承的嵌套类/接口 org.hamcrest.Description
Description.NullDescription
字段概要
从接口继承的字段 org.hamcrest.Description
NONE
构造器概要
构造器 构造器 说明 StringDescription()
StringDescription(Appendable out)
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
append(char c)
Append the char c to the description.protected void
append(String str)
Append the String str to the description.static String
asString(SelfDescribing selfDescribing)
Alias fortoString(SelfDescribing)
.String
toString()
Returns the description as a string.static String
toString(SelfDescribing selfDescribing)
Return the description of aSelfDescribing
object as a String.从类继承的方法 org.hamcrest.BaseDescription
appendDescriptionOf, appendList, appendText, appendValue, appendValueList, appendValueList
构造器详细资料
StringDescription
public StringDescription()
StringDescription
public StringDescription(Appendable out)
方法详细资料
toString
public static String toString(SelfDescribing selfDescribing)
Return the description of aSelfDescribing
object as a String.- 参数:
selfDescribing
- The object to be described.- 返回:
- The description of the object.
asString
public static String asString(SelfDescribing selfDescribing)
Alias fortoString(SelfDescribing)
.
append
protected void append(String str)
从类复制的说明:BaseDescription
Append the String str to the description. The default implementation passes every character toBaseDescription.append(char)
. Override in subclasses to provide an efficient implementation.- 覆盖:
append
在类中BaseDescription
append
protected void append(char c)
从类复制的说明:BaseDescription
Append the char c to the description.- 指定者:
append
在类中BaseDescription