Class StaticLengthLimitedStringBuilder
- java.lang.Object
-
- com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
-
- com.atlassian.confluence.search.v2.extractor.util.StaticLengthLimitedStringBuilder
-
public class StaticLengthLimitedStringBuilder extends AbstractLengthLimitedStringBuilder
- 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
Constructors Constructor Description StaticLengthLimitedStringBuilder(int maxLength)
Constructs a string builder with the specified maximum length.StaticLengthLimitedStringBuilder(int maxLength, AbstractLengthLimitedStringBuilder.LIMIT_BEHAVIOUR limitBehaviour)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
limit()
-
Methods inherited from class com.atlassian.confluence.search.v2.extractor.util.AbstractLengthLimitedStringBuilder
append, append, append, capacity, isLimitReached, length, limitReached, remainingLength, setLength, toString
-
-
-
-
Constructor Detail
-
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 Detail
-
limit
protected int limit()
- Specified by:
limit
in classAbstractLengthLimitedStringBuilder
-
-