org.schwiebert.abl4j.util
Class Tools
java.lang.Object
org.schwiebert.abl4j.util.Tools
public class Tools
- extends Object
- Author:
- Stephan Schwiebert (sschwieb@spinfo.uni-koeln.de)
|
Constructor Summary |
Tools()
|
|
Method Summary |
static boolean |
compatibilityMode()
If true, the application is run in compatibilityMode. |
static void |
configure(PropertiesMap properties)
|
static List |
copyIf(List list,
int begin,
int end,
Predicate p)
|
static int |
findIf(List list,
int begin,
int end,
Predicate p)
|
static Random |
getRandom()
For testing purpose only. |
static int |
random(int n)
|
static void |
removeCopyIf(ITree<?> t,
Vector<IConstituent<?>> overlap)
OutputIterator remove_copy_if(InputIterator first, InputIterator
last, OutputIterator result, Predicate pred);
Remove_copy_if copies elements from the range [first, last) to a
range beginning at result, except that elements for which pred is
true are not copied. |
static List |
removeIf(List list,
int begin,
int end,
Predicate p)
|
static void |
setSeed(int seed)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION
public static final String VERSION
- See Also:
- Constant Field Values
threadLocalRandom
private static InheritableThreadLocal<Random> threadLocalRandom
threadLocalCompatibility
private static InheritableThreadLocal<Boolean> threadLocalCompatibility
logger
private static Logger logger
Tools
public Tools()
configure
public static void configure(PropertiesMap properties)
compatibilityMode
public static boolean compatibilityMode()
- If true, the application is run in compatibilityMode. This means that
results of ABL and ABL4J should always be identical. If false, the results
might not be identical, but ABL4J will run faster. See ABL4J docs for
details.
- Returns:
copyIf
public static List copyIf(List list,
int begin,
int end,
Predicate p)
removeIf
public static List removeIf(List list,
int begin,
int end,
Predicate p)
removeCopyIf
public static void removeCopyIf(ITree<?> t,
Vector<IConstituent<?>> overlap)
- OutputIterator remove_copy_if(InputIterator first, InputIterator
last, OutputIterator result, Predicate pred);
Remove_copy_if copies elements from the range [first, last) to a
range beginning at result, except that elements for which pred is
true are not copied. The return value is the end of the resulting
range. This operation is stable, meaning that the relative order of
the elements that are copied is the same as in the range [first,
last).
findIf
public static int findIf(List list,
int begin,
int end,
Predicate p)
setSeed
public static void setSeed(int seed)
- Parameters:
seed -
random
public static int random(int n)
- Parameters:
n -
- Returns:
getRandom
public static Random getRandom()
- For testing purpose only.
- Returns:
© 2007 Stephan Schwiebert