Package io.cui.tools.string
Class TextSplitter
- java.lang.Object
-
- io.cui.tools.string.TextSplitter
-
- All Implemented Interfaces:
Serializable
public class TextSplitter extends Object implements Serializable
This class provide functionality to transform long text to several html useful representation and encapsulate this as an object. It is implemented as an value-object keeping the calculated text.- Author:
- Eugen Fischer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TextSplitter(String longString)Construct TextSplitter.TextSplitter(String source, int forceLengthBreakCount, int abridgedLengthCount)Alternative Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)StringgetAbridgedText()StringgetTextWithEnforcedLineBreaks()inthashCode()booleanisAbridged()voidsetAbridgedLength(Integer abridgedLength)voidsetForceLengthBreak(Integer forceLengthBreak)StringtoString()
-
-
-
Constructor Detail
-
TextSplitter
public TextSplitter(String longString)
Construct TextSplitter.- Parameters:
longString- source text which will be processed
-
TextSplitter
public TextSplitter(String source, int forceLengthBreakCount, int abridgedLengthCount)
Alternative Constructor- Parameters:
source- target textforceLengthBreakCount- count of characters when a text break will forcedabridgedLengthCount- count of characters
-
-
Method Detail
-
getAbridgedText
public String getAbridgedText()
-
isAbridged
public boolean isAbridged()
-
getTextWithEnforcedLineBreaks
public String getTextWithEnforcedLineBreaks()
-
setForceLengthBreak
public void setForceLengthBreak(Integer forceLengthBreak)
-
setAbridgedLength
public void setAbridgedLength(Integer abridgedLength)
-
-