Class ComposedStyledString
java.lang.Object
org.eclipse.emf.compare.provider.utils.ComposedStyledString
- All Implemented Interfaces:
java.lang.Iterable<IStyledString>,IStyledString.IComposedStyledString
public class ComposedStyledString extends java.lang.Object implements IStyledString.IComposedStyledString
Composed styled string implementation backed by an
ArrayList.-
Constructor Summary
Constructors Constructor Description ComposedStyledString()Creates a new empty instance.ComposedStyledString(java.lang.String text)Creates a new instance with the given text without style.ComposedStyledString(java.lang.String text, IStyledString.Style style)Creates a new instance with the given text and the given style. -
Method Summary
Modifier and Type Method Description IStyledString.IComposedStyledStringappend(java.lang.String str)Append the given string with no style.IStyledString.IComposedStyledStringappend(java.lang.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.java.lang.StringgetString()Returns the Java string for this composed styled string.java.util.Iterator<IStyledString>iterator()
-
Constructor Details
-
ComposedStyledString
public ComposedStyledString()Creates a new empty instance. -
ComposedStyledString
public ComposedStyledString(java.lang.String text)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
public java.lang.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
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
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
- Specified by:
iteratorin interfacejava.lang.Iterable<IStyledString>- See Also:
Iterable.iterator()
-