Package com.wontlost.ckeditor.internal
Record Class ContentManager.ContentStats
java.lang.Object
java.lang.Record
com.wontlost.ckeditor.internal.ContentManager.ContentStats
- Record Components:
characterCount- 纯文本字符数wordCount- 词数(CJK 每字算一词)
- Enclosing class:
ContentManager
内容统计结果:纯文本字符数与词数。
-
Constructor Summary
ConstructorsConstructorDescriptionContentStats(int characterCount, int wordCount) Creates an instance of aContentStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecharacterCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thewordCountrecord component.
-
Constructor Details
-
ContentStats
public ContentStats(int characterCount, int wordCount) Creates an instance of aContentStatsrecord class.- Parameters:
characterCount- the value for thecharacterCountrecord componentwordCount- the value for thewordCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
characterCount
public int characterCount()Returns the value of thecharacterCountrecord component.- Returns:
- the value of the
characterCountrecord component
-
wordCount
public int wordCount()Returns the value of thewordCountrecord component.- Returns:
- the value of the
wordCountrecord component
-