Class ComposedStyledString
java.lang.Object
org.eclipse.emf.compare.provider.utils.ComposedStyledString
- All Implemented Interfaces:
Iterable<IStyledString>
,IStyledString.IComposedStyledString
Composed styled string implementation backed by an
ArrayList
.-
Constructor Summary
ConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionAppend the given string with no style.append
(String str, IStyledString.Style style) Append the given string with the given style.append
(IStyledString.IComposedStyledString composedStyledString) Appends the given composed styled string to this.Returns the Java string for this composed styled string.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 Details
-
ComposedStyledString
public ComposedStyledString()Creates a new empty instance. -
ComposedStyledString
Creates a new instance with the given text without style.- Parameters:
text
- the text.
-
ComposedStyledString
Creates a new instance with the given text and the given style.- Parameters:
text
- the text.style
- the style of the text.
-
-
Method Details
-
getString
Returns the Java string for this composed styled string.- Specified by:
getString
in interfaceIStyledString.IComposedStyledString
- Returns:
- the Java string for this composed styled string.
- See Also:
-
append
Append the given string with no style.- Specified by:
append
in 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
Append the given string with the given style.- Specified by:
append
in 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:
append
in interfaceIStyledString.IComposedStyledString
- Parameters:
composedStyledString
- the styled string to append.- Returns:
- this instance.
- Since:
- 4.0
- See Also:
-
iterator
- Specified by:
iterator
in interfaceIterable<IStyledString>
- See Also:
-