org.jdesktop.swingx.util
Class Separator<T>
java.lang.Object
org.jdesktop.swingx.util.Separator<T>
- Type Parameters:
T
- the type of separator
public class Separator<T>
- extends Object
A simple separator for adding in between each element in a list.
for (String s : strings) {
stringBuilder.append(separator.get().append(s);
}
- Author:
- Karl Schaefer, Bruce Chapman (original idea)
Constructor Summary |
Separator(T initial,
T separator)
Constructs a separator with the specified initial value and remaining separator. |
Method Summary |
T |
get()
Returns the current value of the separator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Separator
public Separator(T initial,
T separator)
- Constructs a separator with the specified initial value and remaining separator.
- Parameters:
initial
- the value to use for the first callseparator
- the value to use after the first call
get
public T get()
- Returns the current value of the separator.
- Returns:
- the separator value
Copyright © 2012. All Rights Reserved.