Class StaticLengthLimitedStringBuilder
java.lang.Object
com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
com.atlassian.confluence.search.v2.extractor.util.StaticLengthLimitedStringBuilder
- Since:
- 8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
AbstractLengthLimitedStringBuilder.LIMIT_BEHAVIOUR
-
Field Summary
Fields inherited from class com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
buffer, limitReached, throwWhenLimitReached
-
Constructor Summary
ConstructorsConstructorDescriptionStaticLengthLimitedStringBuilder
(int maxLength) Constructs a string builder with the specified maximum length.StaticLengthLimitedStringBuilder
(int maxLength, AbstractLengthLimitedStringBuilder.LIMIT_BEHAVIOUR limitBehaviour) -
Method Summary
Methods inherited from class com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
append, append, append, capacity, isLimitReached, length, limitReached, remainingLength, setLength, toString
-
Constructor Details
-
StaticLengthLimitedStringBuilder
public StaticLengthLimitedStringBuilder(int maxLength) Constructs a string builder with the specified maximum length.The string builder will silently stop appending strings when the limit is reached.
Instances of this class are not safe for use by multiple threads.
- Parameters:
maxLength
- Maximum length.
-
StaticLengthLimitedStringBuilder
public StaticLengthLimitedStringBuilder(int maxLength, AbstractLengthLimitedStringBuilder.LIMIT_BEHAVIOUR limitBehaviour)
-
-
Method Details
-
limit
protected int limit()- Specified by:
limit
in classAbstractLengthLimitedStringBuilder
-