Class ComposedStyledString
- java.lang.Object
-
- org.eclipse.emf.compare.provider.utils.ComposedStyledString
-
- All Implemented Interfaces:
Iterable<IStyledString>,IStyledString.IComposedStyledString
public class ComposedStyledString extends Object implements IStyledString.IComposedStyledString
Composed styled string implementation backed by anArrayList.
-
-
Constructor Summary
Constructors Constructor Description ComposedStyledString()Creates a new empty instance.ComposedStyledString(String text)Creates a new instance with the given text without style.ComposedStyledString(String text, IStyledString.Style style)Creates a new instance with the given text and the given style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IStyledString.IComposedStyledStringappend(String str)Append the given string with no style.IStyledString.IComposedStyledStringappend(String str, IStyledString.Style style)Append the given string with the given style.IStyledString.IComposedStyledStringappend(IStyledString.IComposedStyledString composedStyledString)Appends the given composed styled string to this.StringgetString()Returns the Java string for this composed styled string.Iterator<IStyledString>iterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ComposedStyledString
public ComposedStyledString()
Creates a new empty instance.
-
ComposedStyledString
public ComposedStyledString(String text)
Creates a new instance with the given text without style.- Parameters:
text- the text.
-
ComposedStyledString
public ComposedStyledString(String text, IStyledString.Style style)
Creates a new instance with the given text and the given style.- Parameters:
text- the text.style- the style of the text.
-
-
Method Detail
-
getString
public String getString()
Returns the Java string for this composed styled string.- Specified by:
getStringin interfaceIStyledString.IComposedStyledString- Returns:
- the Java string for this composed styled string.
- See Also:
IStyledString.IComposedStyledString.getString()
-
append
public IStyledString.IComposedStyledString append(String str)
Append the given string with no style.- Specified by:
appendin interfaceIStyledString.IComposedStyledString- Parameters:
str- the string to append.- Returns:
- this instance to let you chain the calls.
- See Also:
org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String)
-
append
public IStyledString.IComposedStyledString append(String str, IStyledString.Style style)
Append the given string with the given style.- Specified by:
appendin interfaceIStyledString.IComposedStyledString- Parameters:
str- the string to append.style- the style of the appended string.- Returns:
- this instance to let you chain the calls.
- See Also:
org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString#append(java.lang.String, org.eclipse.emf.compare.ide.ui.internal.util.IComposedStyledString.Style)
-
append
public IStyledString.IComposedStyledString append(IStyledString.IComposedStyledString composedStyledString)
Appends the given composed styled string to this.- Specified by:
appendin interfaceIStyledString.IComposedStyledString- Parameters:
composedStyledString- the styled string to append.- Returns:
- this instance.
- Since:
- 4.0
- See Also:
IStyledString.IComposedStyledString.append(org.eclipse.emf.compare.provider.utils.IStyledString.IComposedStyledString)
-
iterator
public Iterator<IStyledString> iterator()
- Specified by:
iteratorin interfaceIterable<IStyledString>- See Also:
Iterable.iterator()
-
-