Constructor and Description |
---|
FixedSizeLongBuffer(long[] buffer)
Constructor, initialises with the buffer holding initial values
|
SharedFixedSizeLongBuffer(long[] buffer)
Constructor, initialises with the buffer holding initial values
|
Modifier and Type | Method and Description |
---|---|
boolean |
ListMap.add(KeyValuePair<? extends TKey,? extends TValue> kvp)
Adds an item to the collection.
|
boolean |
AvlTreeList.add(KeyValuePair<? extends TKey,? extends TValue> kvp)
Adds a new key/value pair.
|
boolean |
ListMap.add(TKey key,
TValue value)
Adds an item to the collection.
|
boolean |
AvlTreeList.add(TKey key,
TValue value)
Adds a new key/value pair.
|
boolean |
ListMap.contains(TKey key)
Returns true if the given key is contained in the collection.
|
boolean |
AvlTreeList.contains(TKey key)
Returns true if a key is found.
|
TValue |
ListMap.get(TKey key)
Returns the key's value if it exists, otherwise throws KeyNotFoundException.
|
TValue |
AvlTreeList.get(TKey key)
Returns the key's value if it exists, otherwise throws KeyNotFoundException.
|
int |
ListMap.indexOf(TKey key)
Returns the index of the given key, if it is contained in the collection.
|
int |
AvlTreeList.indexOf(TKey key)
Returns the index of the given key, if it is contained in the collection.
|
boolean |
ListMap.remove(TKey key)
Removes an item from the collection.
|
boolean |
AvlTreeList.remove(TKey key)
Removes an item from the collection.
|
boolean |
ListMap.replace(TKey key,
TValue newValue)
Replaces a key's value with the specified new value.
|
boolean |
AvlTreeList.replace(TKey key,
TValue newValue)
Replaces a key's value with the specified new value.
|
Constructor and Description |
---|
AvlTreeList(java.util.Map<? extends TKey,? extends TValue> map)
Constructor initializes from another map
|
AvlTreeList(java.util.Map<? extends TKey,? extends TValue> map,
java.lang.Class<?> genericTypeParameterKey,
java.lang.Class<?> genericTypeParameterValue)
Constructor initializes from another map and the list-map's key/value generic type parameters
|
AvlTreeList(ReifiedMap<TKey,TValue> map)
Constructor initializes with another reified map
|
ListMap(java.util.Map<? extends TKey,? extends TValue> map)
Constructor initializes from another map
|
ListMap(java.util.Map<? extends TKey,? extends TValue> map,
java.lang.Class<?> genericTypeParameterKey,
java.lang.Class<?> genericTypeParameterValue)
Constructor initializes from another map and the list-map's key/value generic type parameters
|
ListMap(ReifiedMap<TKey,TValue> map)
Constructor initializes with another reified map
|
Modifier and Type | Method and Description |
---|---|
boolean |
SharedMapMultimap.contains(T key,
K subkey)
Returns true if the map contains a key
|
boolean |
MapMultimap.contains(T key,
K subkey)
Returns true if the map contains a key
|
boolean |
SharedMapMultimap.containsKey(T key)
Returns true if the map contains a key
|
boolean |
MapMultimap.containsKey(T key)
Returns true if the map contains a key
|
boolean |
SharedMapMultimap.containsSubkey(K key)
Returns true if the map contains a sub-key
|
boolean |
MapMultimap.containsSubkey(K key)
Returns true if the map contains a sub-key
|
boolean |
SharedMapMultimap.containsValue(V value)
Returns true if the map contains a value
|
boolean |
MapMultimap.containsValue(V value)
Returns true if the map contains a value
|
V |
SharedMapMultimap.get(T key,
K subkey)
Returns the first occurrence of a key/sub-key tuple.
|
V |
MapMultimap.get(T key,
K subkey)
Returns the first occurrence of a key/sub-key tuple.
|
java.lang.Iterable<V> |
SharedMapMultimap.getAllValues(T key)
Returns all values held under a key's sub-keys.
|
java.lang.Iterable<V> |
MapMultimap.getAllValues(T key)
Returns all values held under a key's sub-keys.
|
java.util.Map<K,V> |
SharedMapMultimap.getKey(T key)
Returns the sub-map of a key which stores sub-keys -> values.
|
java.util.Map<K,V> |
MapMultimap.getKey(T key)
Returns the sub-map of a key which stores sub-keys -> values.
|
V |
SharedMapMultimap.getValueBySubkey(K subkey)
Returns the first value of a key's sub-key.
|
V |
MapMultimap.getValueBySubkey(K subkey)
Returns the first value of a key's sub-key.
|
java.lang.Iterable<V> |
SharedMapMultimap.getValuesBySubkey(K subkey)
Returns all values under a key's sub-key.
|
java.lang.Iterable<V> |
MapMultimap.getValuesBySubkey(K subkey)
Returns all values under a key's sub-key.
|
V |
SharedMapMultimap.put(T key,
K subkey,
V value)
Inserts a key/subkey/value tuple.
|
V |
MapMultimap.put(T key,
K subkey,
V value)
Inserts a key/subkey/value tuple.
|
V |
SharedMapMultimap.putIfAbsent(T key,
K subkey,
V value)
Inserts a key/subkey/value tuple, if it is absent, returning null.
|
V |
SharedMapMultimap.remove(T key,
K subkey)
Removes a key/sub-key tuple value.
|
V |
MapMultimap.remove(T key,
K subkey)
Removes a key/sub-key tuple value.
|
java.util.concurrent.ConcurrentNavigableMap<K,V> |
SharedMapMultimap.removeKey(T key)
Removes a key's sub-key->value map.
|
java.util.Map<K,V> |
MapMultimap.removeKey(T key)
Removes a key's sub-key->value map.
|
V |
SharedMapMultimap.removeSubKey(K subkey)
Removes the first occurrence of a sub-key.
|
V |
MapMultimap.removeSubKey(K subkey)
Removes the first occurrence of a sub-key.
|
V[] |
SharedMapMultimap.removeSubKeys(K subkey)
Removes all occurrences of a sub-key.
|
V[] |
MapMultimap.removeSubKeys(K subkey)
Removes all occurrences of a sub-key.
|
int |
SharedMapMultimap.size(T key)
Returns the size of a sub-map
|
int |
MapMultimap.size(T key)
Returns the size of a sub-map
|
Constructor and Description |
---|
MapMultimap(java.lang.Class<?> keyType,
java.lang.Class<?> subkeyType,
java.lang.Class<?> valueType) |
SharedMapMultimap(java.lang.Class<?> keyType,
java.lang.Class<?> subkeyType,
java.lang.Class<?> valueType)
Constructor initializes with generic type parameters.
|
Modifier and Type | Method and Description |
---|---|
LongEntry<V> |
LongHashMap.containsValue(V value)
Returns the key/value pair, if the given value exists, otherwise returns null
|
Constructor and Description |
---|
LongHashMap(int maxCapacity,
java.lang.Class<?> genericTypeParameterValue)
Constructs an empty map with the specified max capacity.
|
Constructor and Description |
---|
StackTraceLogger(java.lang.Throwable e,
StackTraceLevel level)
Constructor, initialises with a Throwable
|
Modifier and Type | Method and Description |
---|---|
static Predicates.Predicate1<java.lang.reflect.Constructor<?>> |
Reflection.constructorEqual(java.lang.reflect.Constructor<?> _constructor)
Predicate evaluating to true if given constructor equals the processed value
|
static <T> Predicates.Predicate1<T> |
Objects.containedBy(java.lang.Iterable _elements)
Predicate returning true if an element is contained in the function argument (Iterable)
|
static <T> Predicates.Predicate1<T> |
Objects.containedIn(T[] _elements)
Predicate returning true if an element is contained in the function argument (Array)
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.contains(java.lang.Object _item)
Predicate returning true when the function argument contains an item
|
static Predicates.Predicate1<java.lang.String> |
Strings.contains(java.lang.String _part)
Predicate returning true when the function argument contains some string
|
static <T> Predicates.Predicate1<T> |
Objects.contains(java.lang.String _part)
Predicate returning true when the function argument's toString() contains some string
|
static Predicates.Predicate1<java.lang.String> |
Strings.contains(java.lang.String _part,
StringComparison _comparison)
Predicate returning true when the function argument contains some string
|
static <T> Predicates.Predicate1<T> |
Objects.contains(java.lang.String _part,
StringComparison _comparison)
Predicate returning true when the function argument's toString() contains some string
|
static <T> Predicates.Predicate1<T> |
Arrays.contains(T[] _values)
Predicate returning true when the function argument contains an item
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.containsAll(java.lang.Iterable _items)
Predicate returning true when the function argument contains all items
|
static <T> Predicates.Predicate1<T[]> |
Arrays.containsAll(T[] _values)
Predicate returning true when the function argument contains all items
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.containsAny(java.lang.Iterable _items)
Predicate returning true when the function argument contains any of the given items
|
static <T> Predicates.Predicate1<T[]> |
Arrays.containsAny(T[] _values)
Predicate returning true when the function argument contains any of the given items
|
static <T> Predicates.Predicate1<T[]> |
Arrays.deepEqual(T[] _values)
Predicate returning true when the function argument is deeply equal to another array
|
static Predicates.Predicate1<java.lang.String> |
Strings.endsWith(java.lang.String _suffix)
Predicate returning true when the function argument ends with a suffix
|
static <T> Predicates.Predicate1<T> |
Objects.endsWith(java.lang.String _suffix)
Predicate returning true when the function argument's toString() ends with a suffix
|
static Predicates.Predicate1<java.lang.String> |
Strings.endsWith(java.lang.String _suffix,
StringComparison _comparison)
Predicate returning true when the function argument ends with a suffix
|
static <T> Predicates.Predicate1<T> |
Objects.endsWith(java.lang.String _suffix,
StringComparison _comparison)
Predicate returning true when the function argument's toString() ends with a suffix
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.equal(java.lang.Iterable _value)
Predicate returning true when the function argument is equal to another array
|
static <T> Predicates.Predicate1<T[]> |
Arrays.equal(T[] _value)
Predicate returning true when the function argument is equal to another array
|
static Predicates.Predicate1<java.lang.reflect.Field> |
Reflection.fieldEqual(java.lang.reflect.Field _field)
Predicate evaluating to true if given field equals the processed value
|
static Predicates.Predicate1<java.lang.reflect.Field> |
Reflection.fieldNameEquals(java.lang.String _name,
StringComparison _comparison)
Predicate evaluating to true if a field name matches the given name
|
static <T extends java.lang.Comparable<T>> |
Objects.greaterThan(T _value)
Predicate returning true when the function argument is greater than a value
|
static <T extends java.lang.Comparable<T>> |
Objects.greaterThanOrEqual(T _value)
Predicate returning true when the function argument is greater than or equal to a value
|
static <T> Predicates.Predicate1<T> |
Objects.instanceOf(java.lang.Class<?> _class)
Predicate that returns true if the function argument is an instance of the class specified
|
static Predicates.Predicate1<java.lang.String> |
Strings.isEqual(java.lang.String _other)
Predicate returning true when the function argument is equal to some string
|
static <T> Predicates.Predicate1<T> |
Objects.isEqual(java.lang.String _other)
Predicate returning true when the function argument's toString() is equal to some string
|
static Predicates.Predicate1<java.lang.String> |
Strings.isEqual(java.lang.String _other,
StringComparison _comparison)
Predicate returning true when the function argument is equal to some string
|
static <T> Predicates.Predicate1<T> |
Objects.isEqual(java.lang.String _other,
StringComparison _comparison)
Predicate returning true when the function argument's toString() is equal to some string
|
static <T> Predicates.Predicate1<T> |
Objects.isExtending(java.lang.Class<?> _class)
Predicate that returns true if the function argument is a subclass of the class specified
|
static <T> Predicates.Predicate1<T> |
Objects.isImplementing(java.lang.Class<?> _class)
Predicate that returns true if the function argument is an instance of the interface specified
|
static <T> Predicates.Predicate1<T> |
Objects.isNotExtending(java.lang.Class<?> _class)
Predicate that returns true if the function argument is not a subclass of the class specified
|
static <T> Predicates.Predicate1<T> |
Objects.isNotImplementing(java.lang.Class<?> _class)
Predicate that returns true if the function argument is not an instance of the interface specified
|
static <T extends java.lang.Comparable<T>> |
Objects.lessThan(T _value)
Predicate returning true when the function argument is less than a value
|
static <T extends java.lang.Comparable<T>> |
Objects.lessThanOrEqual(T _value)
Predicate returning true when the function argument is less than or equal to a value
|
static Predicates.Predicate1<MemberInfo> |
Reflection.memberEqual(MemberInfo _member)
Predicate evaluating to true if given member equals the processed value
|
static Predicates.Predicate1<MemberInfo> |
Reflection.memberNameEquals(java.lang.String _name,
StringComparison _comparison)
Predicate evaluating to true if a method name matches the given name
|
static Predicates.Predicate1<java.lang.reflect.Method> |
Reflection.methodEqual(java.lang.reflect.Method _method)
Predicate evaluating to true if given method equals the processed value
|
static Predicates.Predicate1<java.lang.reflect.Method> |
Reflection.methodNameEquals(java.lang.String _name,
StringComparison _comparison)
Predicate evaluating to true if a method name matches the given name
|
static <T> Predicates.Predicate1<T> |
Objects.notContainedBy(java.lang.Iterable _elements)
Predicate returning true if an element is not contained in the function argument (Iterable)
|
static <T> Predicates.Predicate1<T> |
Objects.notContainedIn(T[] _elements)
Predicate returning true if an element is not contained in the function argument (Array)
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.notContains(java.lang.Object _item)
Predicate returning true when the function argument does not contain an item
|
static Predicates.Predicate1<java.lang.String> |
Strings.notContains(java.lang.String _part)
Predicate returning true when the function argument does not contain some string
|
static <T> Predicates.Predicate1<T> |
Objects.notContains(java.lang.String _part)
Predicate returning true when the function argument's toString() does not contain some string
|
static Predicates.Predicate1<java.lang.String> |
Strings.notContains(java.lang.String _part,
StringComparison _comparison)
Predicate returning true when the function argument does not contain some string
|
static <T> Predicates.Predicate1<T> |
Objects.notContains(java.lang.String _part,
StringComparison _comparison)
Predicate returning true when the function argument's toString() does not contain some string
|
static <T> Predicates.Predicate1<T[]> |
Arrays.notContains(T _item)
Predicate returning true when the function argument does not contain an item
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.notContainsAll(java.lang.Iterable _items)
Predicate returning true when the function argument does not contain all items
|
static <T> Predicates.Predicate1<T[]> |
Arrays.notContainsAll(T[] _items)
Predicate returning true when the function argument does not contain all items
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.notContainsAny(java.lang.Iterable _items)
Predicate returning true when the function argument does not contain any of the given items
|
static <T> Predicates.Predicate1<T[]> |
Arrays.notContainsAny(T[] _items)
Predicate returning true when the function argument does not contain any of the given items
|
static Predicates.Predicate1<java.lang.String> |
Strings.notEndsWith(java.lang.String _suffix)
Predicate returning true when the function argument does not end with a suffix
|
static <T> Predicates.Predicate1<T> |
Objects.notEndsWith(java.lang.String _suffix)
Predicate returning true when the function argument's toString() does not end with a suffix
|
static Predicates.Predicate1<java.lang.String> |
Strings.notEndsWith(java.lang.String _suffix,
StringComparison _comparison)
Predicate returning true when the function argument does not end with a suffix
|
static <T> Predicates.Predicate1<T> |
Objects.notEndsWith(java.lang.String _suffix,
StringComparison _comparison)
Predicate returning true when the function argument's toString() does not end with a suffix
|
static Predicates.Predicate1<java.lang.Iterable> |
Iterables.notEqual(java.lang.Iterable _value)
Predicate returning true when the function argument is not equal to another array
|
static <T> Predicates.Predicate1<T[]> |
Arrays.notEqual(T[] _value)
Predicate returning true when the function argument is not equal to another array
|
static <T> Predicates.Predicate1<T> |
Objects.notInstanceOf(java.lang.Class<?> _class)
Predicate that returns true if the function argument is not an instance of the class specified
|
static Predicates.Predicate1<java.lang.String> |
Strings.notStartsWith(java.lang.String _prefix)
Predicate returning true when the function argument does not start with a prefix
|
static <T> Predicates.Predicate1<T> |
Objects.notStartsWith(java.lang.String _prefix)
Predicate returning true when the function argument's toString() does not start with a prefix
|
static Predicates.Predicate1<java.lang.String> |
Strings.notStartsWith(java.lang.String _prefix,
StringComparison _comparison)
Predicate returning true when the function argument does not start with a prefix
|
static <T> Predicates.Predicate1<T> |
Objects.notStartsWith(java.lang.String _prefix,
StringComparison _comparison)
Predicate returning true when the function argument's toString() does not start with a prefix
|
static Predicates.Predicate1<PropertyInfo> |
Reflection.propertyEqual(PropertyInfo _member)
Predicate evaluating to true if given property equals the processed value
|
static Predicates.Predicate1<PropertyInfo> |
Reflection.propertyNameEquals(java.lang.String _name,
StringComparison _comparison)
Predicate evaluating to true if a property name matches the given name
|
static Predicates.Predicate1<java.lang.String> |
Strings.startsWith(java.lang.String _prefix)
Predicate returning true when the function argument starts with a prefix
|
static <T> Predicates.Predicate1<T> |
Objects.startsWith(java.lang.String _prefix)
Predicate returning true when the function argument's toString() starts with a prefix
|
static Predicates.Predicate1<java.lang.String> |
Strings.startsWith(java.lang.String _prefix,
StringComparison _comparison)
Predicate returning true when the function argument starts with a prefix
|
static <T> Predicates.Predicate1<T> |
Objects.startsWith(java.lang.String _prefix,
StringComparison _comparison)
Predicate returning true when the function argument's toString() starts with a prefix
|
Modifier and Type | Method and Description |
---|---|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.append(java.lang.String _suffix)
Returns the string with some appended text
|
static Actions.Action1<java.io.File> |
Files.appendLineToFile(java.lang.String _text)
Action that appends some text data to a file.
|
static Actions.Action1<java.io.File> |
Files.appendToFile(java.lang.String _text)
Action that appends some text data to a file.
|
static Actions.Action1<java.io.File> |
Files.copyFile(java.lang.String _destFilePath)
Action that copies a file from an absolute file path to another
|
static Functions.Function1<java.lang.String,java.lang.Integer> |
Strings.count(java.lang.String _str,
StringComparison _stringComparison)
Returns the number of occurrences of a string within a string
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.crop(char[] _except)
Crops all characters from the start/end of the given string, until an except character is encountered
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.cropEnd(char[] _except)
Crops all characters from the end of the given string, until an except character is encountered
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.cropStart(char[] _except)
Crops all characters from the start of the given string, until an except character is encountered
|
static Functions.Function1<java.io.File,java.lang.String> |
Files.getExtension(java.io.File file)
Returns the extension of the file
|
static Functions.Function1<java.lang.String,java.lang.Integer> |
Strings.indexOf(java.lang.String _part,
StringComparison _stringComparison)
Returns the first index where a part is encountered within a string value.
|
static <T> Functions.Function1<java.lang.Object,T> |
InvokeNoArgs.invokeFunction(java.lang.reflect.Method _method)
A no-argument function which invokes the method name specified on the given object.
|
static <T> Functions.Function1<java.lang.Object,T> |
InvokeOneArg.invokeFunction(java.lang.Object _obj,
java.lang.reflect.Method _method)
A one-argument function which invokes the method specified on the given object, passing the function argument to the invoked method.
|
static Functions.Function1<java.lang.Object,java.lang.Object> |
InvokeDynamicFunc.invokeFunction(java.lang.String methodName)
A one-argument function which invokes the no-arg method on this argument
|
static Functions.Function1<java.lang.Object,java.lang.Object> |
InvokeDynamicFunc.invokeFunction(java.lang.String methodName,
java.lang.Object[] obj)
A one-argument action which invokes the one-arg method on this argument
|
static Functions.Function1<java.lang.Object,java.lang.Object> |
InvokeDynamicFunc.invokeFunctionWithOneArgOn(java.lang.Object obj,
java.lang.String methodName)
A one-argument function which invokes the method name specified on the given object, passing the function argument to the invoked
method.
|
static Actions.Action1<java.lang.Object> |
InvokeNoArgs.invokeMethod(java.lang.reflect.Method _method)
A no-argument action which invokes the method specified on the given object.
|
static Actions.Action1<java.lang.Object> |
InvokeOneArg.invokeMethod(java.lang.Object _obj,
java.lang.reflect.Method _method)
A one-argument action which invokes the method specified on the given object, passing the function argument to the invoked method.
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
InvokeDynamicFunc.invokeMethod(java.lang.String methodName)
A one-argument action which invokes the no-arg method on this argument
|
static Actions.Action1<java.lang.Object> |
InvokeDynamic.invokeMethod(java.lang.String methodName)
Returns a one-argument action which invokes the no-arg method on this argument
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
InvokeDynamicFunc.invokeMethod(java.lang.String methodName,
java.lang.Object[] obj)
A one-argument action which invokes the one-arg method on this argument
|
static Actions.Action1<java.lang.Object> |
InvokeDynamic.invokeMethod(java.lang.String methodName,
java.lang.Object[] obj)
Returns a one-argument action which invokes the one-arg method on this argument
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
InvokeNoArgs.invokeMethodFunc(java.lang.reflect.Method _method)
A no-argument action which invokes the method specified on the given object.
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
InvokeOneArg.invokeMethodFunc(java.lang.Object _obj,
java.lang.reflect.Method _method)
A one-argument action which invokes the method specified on the given object, passing the function argument to the invoked method.
|
static Functions.Function0<java.lang.Void> |
InvokeDynamicFunc.invokeMethodWithNoArgsOn(java.lang.Object obj,
java.lang.String methodName)
A no-argument action which invokes the method name specified on the given object.
|
static Actions.Action0 |
InvokeDynamic.invokeMethodWithNoArgsOn(java.lang.Object obj,
java.lang.String methodName)
A no-argument action which invokes the method name specified on the given object.
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
InvokeDynamicFunc.invokeMethodWithOneArgOn(java.lang.Object obj,
java.lang.String methodName)
A one-argument action which invokes the method name specified on the given object, passing the function argument to the invoked method.
|
static Actions.Action1<java.lang.Object> |
InvokeDynamic.invokeMethodWithOneArgOn(java.lang.Object obj,
java.lang.String methodName)
Returns a one-argument action which invokes the method name specified on the given object, passing the function argument to the invoked
method.
|
static Functions.Function1<java.lang.String,java.lang.Integer> |
Strings.lastIndexOf(java.lang.String value,
java.lang.String _part,
StringComparison _stringComparison)
Returns the last index where a part is encountered within a string value.
|
static Actions.Action1<java.io.File> |
Files.moveFile(java.lang.String _destFilePath)
Action that moves a file from an absolute file path to another
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.prepend(java.lang.String _prefix)
Returns the string with some prepended text
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.replace(java.lang.String _textToReplace,
java.lang.String _replaceWithText,
StringComparison _stringComparison)
Returns the string after some text replacement
|
static Actions.Action1<java.lang.Object> |
MiscProjections.throwDetailed(java.lang.Throwable _e)
Action that throws the specified exception when being invoked.
|
static Functions.Function1<java.lang.Object,java.lang.Void> |
MiscProjections.throwDetailedFunc(java.lang.Throwable _e)
Action that throws the specified exception when being invoked.
|
static Actions.Action0 |
MiscProjections.throwException(java.lang.Throwable _e)
Action that throws the specified exception when being invoked.
|
static Functions.Function0<java.lang.Void> |
MiscProjections.throwExceptionFunc(java.lang.Throwable _e)
Action that throws the specified exception when being invoked.
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.trimEnd(char[] _chars)
Trims the end and returns the given string
|
static Functions.Function1<java.lang.String,java.lang.String> |
Strings.trimStart(char[] _chars)
Trims the start and returns the given string
|
static Actions.Action1<java.io.File> |
Files.tryCopyFile(java.lang.String _destFilePath)
Action that copies a file from an absolute file path to another.
|
static Actions.Action1<java.io.File> |
Files.tryMoveFile(java.lang.String _destFilePath)
Action that moves a file from one absolute file path to another.
|
Constructor and Description |
---|
MultiInitGuard(java.lang.Class<?> owner)
Constructor initialises with the owner of this guard
|
MultiInitGuard(java.lang.String className)
Constructor initialises with the owner of this guard
|
SingleInitGuard(java.lang.Class<?> owner)
Constructor initialises with the owner of this guard
|
SingleInitGuard(java.lang.String className)
Constructor initialises with the name of the owner of this guard
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
ReflectionUtils.activate(java.lang.Class<T> clazz)
Activates an object from the type.
|
static <T> T |
ReflectionUtils.activate(java.lang.Class<T> clazz,
java.lang.Object[] constructorArgs)
Activates an object from the class given, using the specified constructor arguments.
|
static java.lang.Object |
ReflectionUtils.activate(java.lang.String className)
Activates an object from the class name given.
|
static java.lang.Object |
ReflectionUtils.activate(java.lang.String className,
java.lang.Object[] constructorArgs)
Activates an object from the class name given.
|
static <T> T[] |
ArrayUtils.add(T[] array,
T element)
Adds an element to the given array
|
void |
Matcher.addAction(Predicates.Predicate1<T> predicate,
Actions.Action1<T> action)
Adds a predicate and a function.
|
void |
Matcher.addFunction(Predicates.Predicate1<T> predicate)
Adds a predicate and an identity function (F(x)=>x).
|
void |
Matcher.addFunction(Predicates.Predicate1<T> predicate,
Functions.Function1<T,TResult> func)
Adds a predicate and a function.
|
static <TSource,TAccumulate> |
Linq.aggregate(java.lang.Iterable<TSource> values,
TAccumulate seed,
Functions.Function2<TAccumulate,? super TSource,TAccumulate> function)
Applies an accumulator function over a sequence.
|
static <TSource,TAccumulate,TResult> |
Linq.aggregate(java.lang.Iterable<TSource> values,
TAccumulate seed,
Functions.Function2<TAccumulate,? super TSource,TAccumulate> function,
Functions.Function1<TAccumulate,TResult> resultSelector)
Applies an accumulator function over a sequence.
|
static <TSource,TAccumulate> |
Linq.aggregate(TSource[] values,
TAccumulate seed,
Functions.Function2<TAccumulate,? super TSource,TAccumulate> function)
Applies an accumulator function over a sequence.
|
static <TSource,TAccumulate,TResult> |
Linq.aggregate(TSource[] values,
TAccumulate seed,
Functions.Function2<TAccumulate,? super TSource,TAccumulate> function,
Functions.Function1<TAccumulate,TResult> resultSelector)
Applies an accumulator function over a sequence.
|
static <T> boolean |
Linq.all(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns true if a condition is true for all items in a sequence.
|
static <T> boolean |
Linq.all(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns true if a condition is true for all items in a sequence.
|
static <T> boolean |
Linq.any(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns true if a condition is true for any of the items in a sequence.
|
static <T> boolean |
Linq.any(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns true if a condition is true for any of the items in a sequence.
|
static void |
FileUtils.appendData(java.lang.String fileAbsPath,
byte[] data,
int offset,
int count)
Appends some binary data to a file in the specified path.
|
static void |
FileUtils.appendText(java.lang.String fileAbsPath,
java.lang.String text,
java.lang.String eolTerminator)
Appends some text to a file in the specified path.
|
static java.lang.Boolean[] |
ArrayUtils.box(boolean[] booleans)
Converts a boolean[] to a Boolean array.
|
static java.lang.Byte[] |
ArrayUtils.box(byte[] bytes)
Converts a byte[] to a Byte array.
|
static java.lang.Character[] |
ArrayUtils.box(char[] chars)
Converts a char[] to a Character array.
|
static java.lang.Double[] |
ArrayUtils.box(double[] doubles)
Converts a double[] to a Double array.
|
static java.lang.Float[] |
ArrayUtils.box(float[] floats)
Converts a float[] to a Float array.
|
static java.lang.Integer[] |
ArrayUtils.box(int[] ints)
Converts a int[] to an Integer array.
|
static java.lang.Long[] |
ArrayUtils.box(long[] longs)
Converts a long[] to a Long array.
|
static java.lang.Short[] |
ArrayUtils.box(short[] shorts)
Converts a short[] to a Short array.
|
static java.util.List<java.lang.Boolean> |
ArrayUtils.boxBools(boolean[] booleans)
Converts a boolean[] to a Boolean list.
|
static java.util.List<java.lang.Byte> |
ArrayUtils.boxBytes(byte[] bytes)
Converts a byte[] to a Byte list.
|
static java.util.List<java.lang.Character> |
ArrayUtils.boxChars(char[] chars)
Converts a char[] to a Character list.
|
static java.util.List<java.lang.Double> |
ArrayUtils.boxDoubles(double[] doubles)
Converts a double[] to a Double list.
|
static java.util.List<java.lang.Float> |
ArrayUtils.boxFloats(float[] floats)
Converts a float[] to a Float list.
|
static java.util.List<java.lang.Integer> |
ArrayUtils.boxInts(int[] ints)
Converts a int[] to an Integer list.
|
static java.util.List<java.lang.Long> |
ArrayUtils.boxLongs(long[] longs)
Converts a long[] to a Long list.
|
static java.util.List<java.lang.Short> |
ArrayUtils.boxShorts(short[] shorts)
Converts a short[] to a Short list.
|
static <TSource,TDest> |
Linq.cast(java.lang.Iterable<TSource> values,
java.lang.Class<TDest> destinationClass,
InvalidCastBehaviour castBehaviour)
Casts a sequence of values of a certain type to a sequence of values of another type, using the specified behaviour upon the event of a
cast failure.
|
static <TSource,TDest> |
Linq.cast(TSource[] values,
java.lang.Class<TDest> destClass,
InvalidCastBehaviour castBehaviour)
Casts an array of values of a certain type to an array of values of another type, using the specified behaviour upon the event of a
cast failure.
|
static <T> T |
ConversionUtils.changeType(java.lang.Object value,
java.lang.Class<T> targetType)
.NET-style Convert.ChangeType functionality.
|
static void |
ByteArrayUtils.clear(byte[] array)
Sets all elements to 0
|
static <T> void |
ArrayUtils.clear(T[] array,
T element)
Clears an array with the provided value
|
static <T> T[] |
ArrayUtils.clone(T[] array)
Clones the given array
|
static java.lang.String |
FileUtils.combinePath(java.lang.String path,
java.lang.String nextPath)
Combines two paths, appending a directory separator after the first path, if needed.
|
static java.lang.String |
XmlUtils.compact(java.lang.String xml)
Compacts an XML text string, by removing CR, LF, TAB and converting double WHITESPACE characters to single.
|
static void |
XmlUtils.compact(java.lang.StringBuilder xml)
Compacts an XML string builder, by removing CR, LF, TAB and converting double WHITESPACE characters to single.
|
static int |
StringUtils.compare(java.lang.String a,
java.lang.String b,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Comparison function, uses higher performance locale-aware comparison, uses existing collator to avoid creating one every time.
|
static int |
StringUtils.compare(java.lang.String a,
java.lang.String b,
StringComparison stringComparison)
Compares two Strings using the specified string comparison.
|
static char[] |
StringUtils.concat(char[]... values)
Concatenates the given chars.
|
static java.lang.String |
StringUtils.concat(char[] values)
Concatenates the given chars.
|
static <T> java.lang.Iterable<T> |
Linq.concat(java.lang.Iterable<? extends T>... values)
Concatenates two or more sequences
|
static <T> T[] |
Linq.concat(T[]... values)
Concatenates two or more arrays
|
static boolean |
StringUtils.contains(char[] sequence,
char ch)
Returns true if a char sequence contains a character
|
static boolean |
StringUtils.contains(java.lang.Iterable<java.lang.String> values,
java.lang.String value,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if the value is contained in the collection of values.
|
static boolean |
StringUtils.contains(java.lang.Iterable<java.lang.String> values,
java.lang.String value,
StringComparison stringComparison)
Returns true if the value is contained in the collection of values.
|
static <T> boolean |
Linq.contains(java.lang.Iterable<T> values,
T item)
Returns true if an item is contained in a sequence.
|
static <T> boolean |
Linq.contains(java.lang.Iterable<T> values,
T item,
java.util.Comparator<? super T> comparer)
Returns true if an item is contained in a sequence.
|
static boolean |
StringUtils.contains(java.lang.String[] values,
java.lang.String value,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if the value is contained in the collection of values.
|
static boolean |
StringUtils.contains(java.lang.String[] values,
java.lang.String value,
StringComparison stringComparison)
Returns true if the value is contained in the collection of values.
|
static boolean |
StringUtils.contains(java.lang.String value,
char ch)
Returns true if a string contains a character
|
static <T> boolean |
Linq.contains(T[] values,
T item)
Returns true if an item is contained in a sequence.
|
static <T> boolean |
Linq.contains(T[] values,
T item,
java.util.Comparator<? super T> comparer)
Returns true if an item is contained in a sequence.
|
static boolean |
StringUtils.containsAll(java.lang.Iterable<java.lang.String> values,
java.lang.Iterable<java.lang.String> items,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if all items in items are contained in the values string collection.
|
static boolean |
StringUtils.containsAll(java.lang.Iterable<java.lang.String> values,
java.lang.Iterable<java.lang.String> items,
StringComparison stringComparison)
Returns true if all items are contained in the values string collection.
|
static <T> boolean |
Linq.containsAll(java.lang.Iterable<T> values,
java.lang.Iterable<T> items)
Returns true if all of the items are contained in the given values.
|
static <T> boolean |
Linq.containsAll(java.lang.Iterable<T> values,
java.lang.Iterable<T> items,
java.util.Comparator<? super T> comparer)
Returns true if all of the items are contained in the given values.
|
static boolean |
StringUtils.containsAll(java.lang.String value,
char[] characters)
Returns true if all characters are contained in a string.
|
static boolean |
StringUtils.containsAll(java.lang.String value,
java.lang.Iterable<java.lang.String> parts,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if all strings specified are contained in the value string.
|
static boolean |
StringUtils.containsAll(java.lang.String value,
java.lang.Iterable<java.lang.String> parts,
StringComparison stringComparison)
Returns true if all strings specified are contained in the value string.
|
static <T> boolean |
Linq.containsAll(T[] values,
T[] items)
Returns true if all of the items are contained in the given values.
|
static <T> boolean |
Linq.containsAll(T[] values,
T[] items,
java.util.Comparator<? super T> comparer)
Returns true if all of the items are contained in the given values.
|
static boolean |
StringUtils.containsAny(java.lang.Iterable<java.lang.String> values,
java.lang.Iterable<java.lang.String> items,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if any item in items is contained in the values string collection.
|
static boolean |
StringUtils.containsAny(java.lang.Iterable<java.lang.String> values,
java.lang.Iterable<java.lang.String> items,
StringComparison stringComparison)
Returns true if any item in items is contained in the values string collection.
|
static <T> boolean |
Linq.containsAny(java.lang.Iterable<T> values,
java.lang.Iterable<T> items)
Returns true if any of the items are contained in the given values.
|
static <T> boolean |
Linq.containsAny(java.lang.Iterable<T> values,
java.lang.Iterable<T> items,
java.util.Comparator<? super T> comparer)
Returns true if any of the items are contained in the given values.
|
static boolean |
StringUtils.containsAny(java.lang.String value,
char[] characters)
Returns true if all characters are contained in a string.
|
static boolean |
StringUtils.containsAny(java.lang.String value,
java.lang.Iterable<java.lang.String> parts,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if any of the strings are contained in a string.
|
static boolean |
StringUtils.containsAny(java.lang.String value,
java.lang.Iterable<java.lang.String> parts,
StringComparison stringComparison)
Returns true if any of the strings are contained in a string.
|
static <T> boolean |
Linq.containsAny(T[] values,
T[] items)
Returns true if any of the items are contained in the given values.
|
static <T> boolean |
Linq.containsAny(T[] values,
T[] items,
java.util.Comparator<? super T> comparer)
Returns true if any of the items are contained in the given values.
|
static void |
StreamUtils.copy(java.io.InputStream from,
java.io.OutputStream to,
long length)
Copies data from one stream to another.
|
static java.lang.String |
StringUtils.copy(java.lang.String value,
int startIndex,
int endIndex)
Similar to String.Substring
|
static <T> T[] |
ArrayUtils.copy(T[] array)
Clones the given array
|
static void |
FileUtils.copyFile(java.lang.String originatingPath,
java.lang.String destinationPath)
Copies a file from source to destination
|
static int |
ByteArrayUtils.count(byte[] data,
int startIndex,
byte[] value)
Returns the number of occurences of a byte sequence within a byte sequence.
|
static int |
StringUtils.count(char[] array,
char ch)
Returns the number of occurences of a character in a character array.
|
static <T> int |
Linq.count(java.lang.Iterable<T> values)
Counts an Iterable in the most efficient manner possible.
|
static <T> int |
Linq.count(java.lang.Iterable<T> values,
T item)
Returns the number of occurrences of an object in a sequence.
|
static <T> int |
Linq.count(java.lang.Iterable<T> values,
T item,
java.util.Comparator<? super T> comparer)
Returns the number of occurrences of an object in a sequence.
|
static int |
ArrayUtils.count(java.lang.Object array)
Returns the length of any array (primitive or object array).
|
static int |
StringUtils.count(java.lang.String value,
char character)
Returns the number of occurences of a character in a string value.
|
static int |
StringUtils.count(java.lang.String value,
java.lang.String element,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the number of occurences of a string element in a string value, using the specified string comparison type.
|
static int |
StringUtils.count(java.lang.String value,
java.lang.String element,
StringComparison stringComparison)
Returns the number of occurences of a string element in a string value, using the specified string comparison type.
|
static <T> int |
Linq.count(T[] array)
Returns the array length.
|
static <T> int |
Linq.count(T[] values,
T item)
Returns the number of occurrences of an object in a sequence.
|
static <T> int |
Linq.count(T[] values,
T item,
java.util.Comparator<? super T> comparer)
Returns the number of occurrences of an object in a sequence.
|
static <T> int |
Linq.countWhere(java.lang.Iterable<? extends T> values,
Predicates.Predicate1<? super T> predicate)
Returns the number of occurrences that satisfy the given condition.
|
static <T> int |
Linq.countWhere(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns the number of occurrences that satisfy the given condition.
|
static <T> T[] |
ArrayUtils.create(java.lang.Class<?> componentType,
int size)
Creates a generic array
|
static <T> T[] |
ArrayUtils.create(T value,
int length)
Creates a 1-dimensional array populated with the specified element in all places
|
static <T> T[][] |
ArrayUtils.create(T value,
int lengthX,
int lengthY)
Creates a 2-dimensional array populated with the specified element's reference in all places
|
static void |
FileUtils.createApplicationShortcut(java.lang.String shortcutAbsPath,
java.lang.String linkedResourceAbsPath,
java.lang.String applicationWorkingDirectory)
On Win32/Linux, creates a shortcut to a file, folder or application (if an application working dir is specified).
|
static void |
FileUtils.createDirectory(java.io.File dirAbsPath)
Creates a directory if it does not already exist (if there are subdirectories there are created too).
|
static void |
FileUtils.createInternetShortcut(java.lang.String shortcutAbsPath,
java.lang.String url)
Creates a URL shortcut.
|
static java.lang.String |
StringUtils.cropEnd(java.lang.String value,
char[] except)
Crops all characters from the end of the given string, until a character is encountered which exists in the given exception array
|
static java.lang.String |
StringUtils.cropStart(java.lang.String value,
char[] except)
Crops all characters from the start of the given string, until a character is encountered which exists in the given exception array
|
static <T> T[] |
ArrayUtils.deepClone(T[] array)
Clones the given array, by invoking clone on all non-null elements of the array.
|
static <T> java.lang.Iterable<T> |
Linq.defaultIfEmpty(java.lang.Iterable<T> values)
Returns the sequence if at least one element exists in it, otherwise returns a collection consisting of a single element which has a
null value.
|
static <T> T[] |
Linq.defaultIfEmpty(T[] values)
Returns the sequence if at least one element exists in it, otherwise returns a collection consisting of a single element which has a
null value.
|
static java.lang.String |
StringUtils.delete(java.lang.String value,
int startIndex,
int endIndex)
Deletes the specified range of characters from the string.
|
static void |
FileUtils.deleteDirectory(java.io.File dirAbsPath)
Deletes an empty directory, if it exists.
|
static void |
FileUtils.deleteDirectoryRecursive(java.io.File dirAbsPath)
Deletes a directory recursively (if there are contents they will be deleted).
|
static void |
FileUtils.deleteFile(java.lang.String fileAbsPath)
Deletes a file, if it exists.
|
static java.lang.String |
StringUtils.delimit(char[] values,
java.lang.String delimiter)
Concatenates the given chars with the given delimiter between all values.
|
static java.lang.String |
StringUtils.delimit(java.lang.Iterable<java.lang.String> values,
java.lang.String delimiter,
java.lang.String nullReplacementValue)
Concatenates the given values using their toString() method and appending the given delimiter between all values.
|
static <T> java.lang.String |
Linq.delimit(java.lang.Iterable<T> values,
java.lang.String delimiter,
java.lang.String nullReplacementValue)
Concatenates the given values using their ToString method and appending the given delimiter between all values.
|
static java.lang.String |
StringUtils.delimit(java.lang.String[] values,
java.lang.String delimiter,
java.lang.String nullReplacementValue)
Concatenates the given values using their toString() method and appending the given delimiter between all values.
|
static <T> java.lang.String |
Linq.delimit(T[] values,
java.lang.String delimiter,
java.lang.String nullReplacementValue)
Concatenates the given values using their ToString method and appending the given delimiter between all values.
|
static java.lang.String |
StringUtils.detectLineSeparator(java.lang.String text,
float ratio)
Returns CR, LF or CRLF, depending on the frequency of line separators found in the given text data.
|
static <T> java.lang.Iterable<T> |
Linq.distinct(java.lang.Iterable<T> values)
Returns distinct (i.e.
|
static <T> java.lang.Iterable<T> |
Linq.distinct(java.lang.Iterable<T> values,
java.util.Comparator<? super T> comparer)
Returns distinct (i.e.
|
static <T> T[] |
Linq.distinct(T[] values)
Returns distinct (i.e.
|
static <T> T[] |
Linq.distinct(T[] values,
java.util.Comparator<? super T> comparer)
Returns distinct (i.e.
|
static <T> T |
Linq.elementAt(java.lang.Iterable<T> values,
int index)
Returns the element at the given position in the provided sequence.
|
static <T> T |
Linq.elementAtOrDefault(java.lang.Iterable<T> values,
int index)
Returns the element at the given position in the provided sequence.
|
static <T> T |
Linq.elementAtOrDefault(T[] values,
int index)
Returns the element at the given position in the provided sequence.
|
static boolean |
ByteArrayUtils.endsWith(byte[] data,
byte[] value)
Returns true if a buffer ends with a value.
|
static boolean |
StringUtils.endsWith(java.lang.String value,
char suffix)
Returns true if the value ends with a suffix.
|
static boolean |
ReflectionUtils.equal(java.lang.reflect.Constructor<?> constrA,
java.lang.reflect.Constructor<?> constrB)
Compares two Constructors and returns true if they appear to be referring to the same constructor.
|
static boolean |
ReflectionUtils.equal(java.lang.reflect.Field fieldA,
java.lang.reflect.Field fieldB)
Compares two Field classes and returns true if they appear to be referring to the same signature of a field.
|
static boolean |
ReflectionUtils.equal(MemberInfo membA,
MemberInfo membB)
Compares two class members and returns true if they appear to be referring to the same member.
|
static boolean |
ReflectionUtils.equal(java.lang.reflect.Method methodA,
java.lang.reflect.Method methodB)
Compares two Method classes and returns true if they appear to be referring to the same signature of a method.
|
static boolean |
ReflectionUtils.equal(PropertyInfo propA,
PropertyInfo propB)
Compares two Method classes and returns true if they appear to be referring to the same signature of a property.
|
static boolean |
StringUtils.equal(java.lang.String a,
java.lang.String b,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns true if a value equals with another.
|
static boolean |
StringUtils.equal(java.lang.String a,
java.lang.String b,
StringComparison stringComparison)
Returns true if a value equals with another.
|
static <T> java.lang.Iterable<T> |
Linq.except(java.lang.Iterable<T> values,
java.lang.Iterable<T> removedValues)
Returns all distinct values except the specified removed values.
|
static <T> java.lang.Iterable<T> |
Linq.except(java.lang.Iterable<T> values,
java.lang.Iterable<T> removedValues,
java.util.Comparator<? super T> comparer)
Returns all distinct values except the specified removed values.
|
static <T> T[] |
Linq.except(T[] values,
T[] removedValues)
Returns all distinct values except the specified removed values.
|
static <T> T[] |
Linq.except(T[] values,
T[] removedValues,
java.util.Comparator<? super T> comparer)
Returns all distinct values except the specified removed values.
|
static boolean |
FileUtils.exists(java.io.File file)
Returns true if the file exists
|
static boolean |
FileUtils.exists(java.lang.String file)
Returns true if the file exists
|
static java.io.File[] |
FileUtils.filterIn(java.io.File[] files,
java.util.Set<FileAttribute> fileAttributes)
Filters out files/directories which do not have the specified attributes.
|
static java.io.File[] |
FileUtils.filterOut(java.io.File[] files,
java.util.Set<FileAttribute> fileAttributes)
Filters out files/directories which have the specified attributes.
|
static java.util.List<org.w3c.dom.Node> |
XmlUtils.findAllNodes(org.w3c.dom.Node node,
java.lang.String childNodeName,
MatchType matchType,
StringComparison comparisonType)
Searches for all matching child nodes found under the given Node.
|
static org.w3c.dom.Node |
XmlUtils.findAttribute(org.w3c.dom.Node node,
java.lang.String attributeName,
MatchType matchType,
StringComparison comparisonType)
Searches for the first matching attribute found on the given Node.
|
static org.w3c.dom.Node |
XmlUtils.findNode(org.w3c.dom.Node node,
java.lang.String childNodeName,
int index,
MatchType matchType,
StringComparison comparisonType)
Searches for a matching child node found under the given Node.
|
static <T> T |
Linq.first(java.lang.Iterable<T> values)
Returns the first element in the provided sequence.
|
static <T> T |
Linq.first(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns the first element in the provided sequence that matches a condition.
|
static <T> T |
Linq.first(T[] values)
Returns the first element in the provided sequence.
|
static <T> T |
Linq.first(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns the first element in the provided sequence that matches a condition.
|
static <T> T |
Linq.firstOrDefault(java.lang.Iterable<T> values)
Returns the first element in the provided sequence.
|
static <T> T |
Linq.firstOrDefault(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns the first element in the provided sequence that matches a condition.
|
static <T> T |
Linq.firstOrDefault(T[] values)
Returns the first element in the provided array.
|
static <T> T |
Linq.firstOrDefault(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns the first element in the provided sequence that matches a condition.
|
static <T> java.lang.Iterable<T> |
Linq.forAll(java.lang.Iterable<T> values,
Actions.Action1<T> action)
Executes an action against all elements, returning them
|
static <T> T[] |
Linq.forAll(T[] values,
Actions.Action1<T> action)
Executes an action against all elements, returning them
|
static byte[] |
ConversionUtils.fromAlphanumericToByteArray(java.lang.String alphanumeric)
Converts an alphanumeric string to a byte array
|
static byte[] |
ConversionUtils.fromAlphanumericToByteArray(java.lang.String alphanumeric,
int startIndex,
int length)
Converts an alphanumeric string to a byte array
|
static UnsignedLong |
ConversionUtils.fromAlphanumericToUInt64(java.lang.String alphanumeric)
Converts an alphanumeric back to a ulong
|
static byte |
ConversionUtils.fromBase64ToByte(java.lang.String base64)
Converts a Base64 back to a byte.
|
static byte[] |
ConversionUtils.fromBase64ToByteArray(java.lang.String base64)
Converts a Base64 representation to a byte array.
|
static byte[] |
ConversionUtils.fromBase64ToByteArray(java.lang.String base64,
int startIndex,
int length)
Converts a Base64 representation to a byte array.
|
static short |
ConversionUtils.fromBase64ToInt16(java.lang.String base64)
Converts a Base64 back to a short.
|
static int |
ConversionUtils.fromBase64ToInt32(java.lang.String base64)
Converts a Base64 back to an int.
|
static long |
ConversionUtils.fromBase64ToInt64(java.lang.String base64)
Converts a Base64 back to a long.
|
static UnsignedShort |
ConversionUtils.fromBase64ToUInt16(java.lang.String base64)
Converts a Base64 back to a ushort.
|
static UnsignedInteger |
ConversionUtils.fromBase64ToUInt32(java.lang.String base64)
Converts a Base64 back to a uint.
|
static UnsignedLong |
ConversionUtils.fromBase64ToUInt64(java.lang.String base64)
Converts a Base64 back to a ulong.
|
static byte |
ConversionUtils.fromBinaryToByte(java.lang.String binary)
Converts a binary back to a byte.
|
static byte[] |
ConversionUtils.fromBinaryToByteArray(java.lang.String binary)
Converts a binary back to a byte[].
|
static byte[] |
ConversionUtils.fromBinaryToByteArray(java.lang.String binary,
int startIndex,
int length)
Converts a binary back to a byte[].
|
static short |
ConversionUtils.fromBinaryToInt16(java.lang.String binary)
Converts a binary back to a short.
|
static int |
ConversionUtils.fromBinaryToInt32(java.lang.String binary)
Converts a binary back to an int.
|
static long |
ConversionUtils.fromBinaryToInt64(java.lang.String binary)
Converts a binary back to a long.
|
static UnsignedShort |
ConversionUtils.fromBinaryToUInt16(java.lang.String binary)
Converts a binary back to a ushort.
|
static UnsignedInteger |
ConversionUtils.fromBinaryToUInt32(java.lang.String binary)
Converts a binary back to an uint.
|
static UnsignedLong |
ConversionUtils.fromBinaryToUInt64(java.lang.String binary)
Converts a binary back to a ulong.
|
static UnsignedByte |
ConversionUtils.fromBinaryToUInt8(java.lang.String binary)
Converts a binary back to an unsigned byte.
|
static byte |
ConversionUtils.fromHexToByte(java.lang.String hex)
Converts a hex back to a byte Hex representations can be endian dependent.
|
static byte[] |
ConversionUtils.fromHexToByteArray(java.lang.String hex,
int startIndex,
int length)
Converts a hex string to a byte array Hex representations can be endian dependent.
|
static int |
ConversionUtils.fromHexToInt32(java.lang.String hex)
Converts a hex back to an int Hex representations can be endian dependent.
|
static long |
ConversionUtils.fromHexToInt64(java.lang.String hex)
Converts a hex back to a long Hex representations can be endian dependent.
|
static UnsignedInteger |
ConversionUtils.fromHexToUInt16(java.lang.String hex)
Converts a hex back to a ushort Hex representations can be endian dependent.
|
static UnsignedInteger |
ConversionUtils.fromHexToUInt32(java.lang.String hex)
Converts a hex back to a uint Hex representations can be endian dependent.
|
static UnsignedLong |
ConversionUtils.fromHexToUInt64(java.lang.String hex)
Converts a hex back to a ulong Hex representations can be endian dependent.
|
static UnsignedByte |
ConversionUtils.fromHexToUInt8(java.lang.String hex)
Converts a hex back to a ushort Hex representations can be endian dependent.
|
static byte |
ConversionUtils.fromStringToByte(java.lang.String value)
Converts a string back to a byte
|
static short |
ConversionUtils.fromStringToInt16(java.lang.String value)
Converts a string back to a short
|
static int |
ConversionUtils.fromStringToInt32(java.lang.String value)
Converts a string back to an int
|
static long |
ConversionUtils.fromStringToInt64(java.lang.String value)
Converts a string back to a long
|
static UnsignedShort |
ConversionUtils.fromStringToUInt16(java.lang.String value)
Converts a string back to a ushort
|
static UnsignedInteger |
ConversionUtils.fromStringToUInt32(java.lang.String value)
Converts a string back to a uint
|
static UnsignedLong |
ConversionUtils.fromStringToUInt64(java.lang.String value)
Converts a string back to a ulong
|
static UnsignedByte |
ConversionUtils.fromStringToUInt8(java.lang.String value)
Converts a string back to an unsigned byte
|
static org.joda.time.Duration |
ConversionUtils.fromXMLDuration(javax.xml.datatype.Duration value)
Converts an XML Duration data type to a Joda Duration
|
static org.joda.time.LocalDateTime |
ConversionUtils.fromXMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar value)
Converts an XML Gregorian Calendar data type to a Joda LocalDateTime
|
static java.util.List<java.lang.annotation.Annotation> |
ReflectionUtils.getAnnotations(java.lang.Class<?> annotatedClass,
boolean includeInherited)
Returns all annotations from the annotated class (and its subclasses if required)
|
static <T extends java.lang.annotation.Annotation> |
ReflectionUtils.getAnnotations(java.lang.Class<?> annotatedClass,
java.lang.Class<T> annotationType,
boolean includeInherited)
Returns all annotations from the annotated class (and its subclasses if required)
|
static byte[] |
ByteArrayUtils.getBytes(UnsignedInteger value)
Similar to BitConverter.GetBytes() of .NET.
|
static byte[] |
ByteArrayUtils.getBytes(UnsignedLong value)
Similar to BitConverter.GetBytes() of .NET.
|
static byte[] |
ByteArrayUtils.getBytes(UnsignedShort value)
Similar to BitConverter.GetBytes() of .NET.
|
static byte[] |
ByteArrayUtils.getBytes(java.util.UUID uuid)
Converts a UUID to a byte array.
|
static java.util.List<java.lang.Class<?>> |
ReflectionUtils.getClasses(java.lang.Package pkg)
Lists all classes inside a package.
|
static java.lang.reflect.Constructor<?> |
ReflectionUtils.getConstructorDefault(java.lang.Class<?> type)
Returns null if a type has no default no-argument constructor, otherwise returns the constructor.
|
static java.lang.reflect.Constructor<?>[] |
ReflectionUtils.getConstructors(java.lang.Class<?> type,
boolean includeSuperClass)
Gets all constructors found in a type.
|
static int |
ArrayUtils.getDimensions(java.lang.Object array)
Returns the dimensions of the provided object.
|
static java.lang.String |
EnvironmentUtils.getEnv(java.lang.String name)
Returns the string value of the variable, or null if the variable is not defined in the system environment
|
static java.lang.reflect.Field |
ReflectionUtils.getField(java.lang.Class<?> type,
java.lang.String name,
boolean includeInherited)
Returns the constructor information for an object's property, if found, otherwise null.
|
static java.lang.reflect.Field[] |
ReflectionUtils.getFields(java.lang.Class<?> type,
boolean includeInherited)
Gets all fields found in a type.
|
static java.lang.String |
FileUtils.getFileExtension(java.io.File file)
Returns the specified file's extension, or an empty string if no extension was found
|
static java.lang.String |
FileUtils.getFileExtension(java.lang.String filename)
Returns the specified file's extension, or an empty string if no extension was found
|
static java.lang.String |
FileUtils.getFileName(java.io.File file)
Trims the file's extension (if there is one) and returns the file name
|
static java.lang.String |
FileUtils.getFileName(java.lang.String filename)
Trims the file's extension (if there is one) and returns the file name
|
static java.lang.Class<?>[] |
ReflectionUtils.getInterfaces(java.lang.Class<?> type,
boolean includeInherited)
Returns all interfaces of a type, except the specified as a generic argument one (T).
|
static java.lang.Class<?>[] |
ReflectionUtils.getInterfacesExcept(java.lang.Class<?> type,
java.lang.Class<?> excludedInterface)
Returns all interfaces of a type, except the specified as a generic argument one (T).
|
static MemberInfo |
ReflectionUtils.getMember(java.lang.Class<?> type,
java.lang.String name,
boolean includeInherited)
Returns the property information for an object's property, if found, otherwise null.
|
static MemberInfo[] |
ReflectionUtils.getMembers(java.lang.Class<?> type,
boolean includeInherited)
Returns all methods found in a class type.
|
static java.lang.reflect.Method |
ReflectionUtils.getMethod(java.lang.Class<?> type,
java.lang.String name,
boolean includeInherited)
Returns the method information for an object's method, if found, otherwise null.
|
static java.util.List<java.lang.annotation.Annotation> |
ReflectionUtils.getMethodAnnotations(java.lang.reflect.Method annotatedMethod,
boolean includeInherited)
Returns all annotations from the annotated method which are of specified annotation class type (or any its subclasses, if required)
|
static <T extends java.lang.annotation.Annotation> |
ReflectionUtils.getMethodAnnotations(java.lang.reflect.Method annotatedMethod,
java.lang.Class<T> annotationType,
boolean includeInherited)
Returns all annotations from the annotated method which are of specified annotation class type (or any its subclasses, if required)
|
static java.lang.reflect.Method[] |
ReflectionUtils.getMethods(java.lang.Class<?> type,
boolean includeInherited)
Returns all methods found in a class type.
|
static PrimitiveType |
ReflectionUtils.getPrimitiveType(java.lang.Class<?> type)
Returns true if the type specified is a primitive type such as int, boolean, etc.
|
static PropertyInfo[] |
ReflectionUtils.getProperties(java.lang.Class<?> type,
boolean includeInherited)
Gets all properties found in a type.
|
static PropertyInfo[] |
ReflectionUtils.getProperties(java.lang.Class<?> type,
java.lang.String name,
boolean includeInherited)
Returns all properties found in a class type matching the given name.
|
static PropertyInfo |
ReflectionUtils.getProperty(java.lang.Class<?> type,
java.lang.String name,
boolean includeInherited)
Returns the property information for an object's property, if found, otherwise null.
|
static byte[] |
FileUtils.getResourceData(java.net.URL url)
Returns the data of the specified URL.
|
static java.io.InputStream |
FileUtils.getResourceStreamData(java.net.URL url)
Returns an input stream to the specified resource.
|
static java.lang.String |
FileUtils.getResourceTextData(java.net.URL url,
java.nio.charset.Charset charset)
Returns the text data of the specified URL.
|
static java.net.URL |
FileUtils.getResourceUrl(java.lang.Package pkg,
java.lang.String filename)
Returns the URL to a resource, by its package and name e.g.
|
static java.net.URL |
FileUtils.getResourceUrl(java.lang.String classpath)
Returns the URL to a resource, by its class path e.g.
|
static java.lang.reflect.Type |
SuperTypeToken.getType(java.lang.Class<?> clazz,
int pos)
Returns the Type of a class's formal type argument, at a given position.
|
static PrimitiveArrayType |
ArrayUtils.getType(java.lang.Object array)
Returns true if the provided object refers to a primitive array, e.g.
|
static <TKey,TResult> |
Linq.groupBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector)
Groups elements by a specified key.
|
static <TKey,TResult> |
Linq.groupBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer)
Groups elements by a specified key and comparer.
|
static <TKey,TResult> |
Linq.groupBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector)
Groups elements by a specified key.
|
static <TKey,TResult> |
Linq.groupBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer)
Groups elements by a specified key and comparer.
|
static boolean |
ReflectionUtils.hasField(java.lang.Class<?> type,
java.lang.reflect.Field field,
boolean includeInherited)
Returns true if a field appears to be part of a type.
|
static boolean |
ReflectionUtils.hasMember(java.lang.Class<?> type,
MemberInfo member,
boolean includeInherited)
Returns true if a member appears to be part of a type.
|
static boolean |
ReflectionUtils.hasMethod(java.lang.Class<?> type,
java.lang.reflect.Method method,
boolean includeInherited)
Returns true if a method appears to be part of a type.
|
static boolean |
ReflectionUtils.hasProperty(java.lang.Class<?> type,
PropertyInfo property,
boolean includeInherited)
Returns true if a method appears to be part of a type.
|
static int |
ByteArrayUtils.indexOf(byte[] data,
byte[] value,
int occurrence)
Returns the index of the first/second/third/etc.
|
static int |
ByteArrayUtils.indexOf(byte[] data,
int startIndex,
byte[] value)
Returns the first index of a byte sequence encountered within some data.
|
static int |
StringUtils.indexOf(char[] array,
char ch)
Finds the first index encountered of a particular character.
|
static <T> int |
Linq.indexOf(java.lang.Iterable<T> values,
T element)
Returns the index where the specified element is first found.
|
static <T> int |
Linq.indexOf(java.lang.Iterable<T> values,
T element,
java.util.Comparator<? super T> comparer)
Returns the index where the specified element is first found.
|
static int |
StringUtils.indexOf(java.lang.String value,
java.lang.String part,
int startIndex,
int count,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the first, second, third, etc.
|
static int |
StringUtils.indexOf(java.lang.String value,
java.lang.String part,
int startIndex,
int count,
StringComparison stringComparison)
Returns the first, second, third, etc.
|
static int |
StringUtils.indexOf(java.lang.String value,
java.lang.String part,
int occurrence,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the index of the first/second/third/etc.
|
static int |
StringUtils.indexOf(java.lang.String value,
java.lang.String part,
int occurrence,
StringComparison stringComparison)
Returns the index of the first/second/third/etc.
|
static int |
StringUtils.indexOf(java.lang.String value,
java.lang.String part,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the first index where a part is encountered within a string value.
|
static <T> int |
Linq.indexOf(T[] values,
T element)
Returns the index where the specified element is first found.
|
static <T> int |
Linq.indexOf(T[] values,
T element,
java.util.Comparator<? super T> comparer)
Returns the index where the specified element is first found.
|
static void |
ReflectionUtils.injectProperty(java.lang.Object obj,
java.lang.String propertyName,
java.lang.Object propertyValue,
boolean includeInherited)
Inject a value to a property of an object.
|
static java.lang.String |
StringUtils.insert(java.lang.String value,
int index,
java.lang.String insertedValue)
Inserts a string in a position in the given string.
|
static boolean |
ReflectionUtils.instanceOf(java.lang.Class<?> type,
java.lang.Class<?> baseClassOrInterfaceType)
Returns true if any of the type's base types/interfaces are equal to the given type, or if the two types are the same.
|
static <T> java.lang.Iterable<T> |
Linq.intersect(java.lang.Iterable<T> first,
java.lang.Iterable<T> second)
Returns the intersection of the distinct elements of two sequences.
|
static <T> java.lang.Iterable<T> |
Linq.intersect(java.lang.Iterable<T> first,
java.lang.Iterable<T> second,
java.util.Comparator<? super T> comparer)
Returns the intersection of the distinct elements of two sequences.
|
static <T> T[] |
Linq.intersect(T[] first,
T[] second)
Returns the intersection of the distinct elements of two sequences.
|
static <T> T[] |
Linq.intersect(T[] first,
T[] second,
java.util.Comparator<? super T> comparer)
Returns the intersection of the distinct elements of two sequences.
|
static boolean |
FileUtils.isDirectory(java.io.File file)
Returns true if the File is a directory
|
static boolean |
FileUtils.isDirectory(java.lang.String file)
Returns true if the File is a directory
|
static <T> boolean |
Linq.isEmpty(java.lang.Iterable<T> values)
Returns true if the sequence is empty.
|
static <T> boolean |
Linq.isEmpty(T[] values)
Returns true if the array is empty.
|
static boolean |
ReflectionUtils.isExtending(java.lang.Class<?> type,
java.lang.Class<?> baseClassType)
Returns true if any of the type's BaseTypes are equal to the given type or if the two types are the same.
|
static boolean |
FileUtils.isFile(java.io.File file)
Returns true if the File is not a directory
|
static boolean |
FileUtils.isFile(java.lang.String file)
Returns true if the File is not a directory
|
static boolean |
ReflectionUtils.isGeneric(java.lang.Class<?> type)
Returns true if a class is generic
|
static boolean |
ReflectionUtils.isGetter(java.lang.reflect.Method method)
Returns true if the method appears to be a POJO getter.
|
static boolean |
ReflectionUtils.isImplementing(java.lang.Class<?> type,
java.lang.Class<?> interfaceType)
Returns true if the given type implements the interface type specified.
|
static boolean |
ReflectionUtils.isLookingLike(java.lang.Class<?> type,
java.lang.Class<?> interfaceType,
boolean includeTypeInherited,
boolean includeInterfaceTypeInherited)
Returns true if the given type appears to look like a given interface (or other class).
|
static boolean |
ReflectionUtils.isNested(java.lang.Class<?> type)
Returns true if the class given is taking part in a nested class hierarchy.
|
static boolean |
ReflectionUtils.isOverridable(java.lang.Class<?> type)
Checks that a class is overridable, i.e.
|
static boolean |
ReflectionUtils.isOverridable(java.lang.reflect.Method methodInfo)
Returns true if a method can be overridden.
|
static boolean |
ReflectionUtils.isReturnTypeVoid(java.lang.reflect.Method method)
Returns true if the method return type is void.
|
static boolean |
ReflectionUtils.isSetter(java.lang.reflect.Method method)
Returns true if the method appears to be a POJO setter.
|
static byte[] |
ByteArrayUtils.join(byte[] a,
byte[] b)
Joins two byte arrays.
|
static byte[] |
ByteArrayUtils.join(java.lang.Iterable<byte[]> arrays)
Joins two or more arrays in the order they were provided.
|
static <T> T[] |
ArrayUtils.join(java.lang.Iterable<T[]> arrays)
Joins two or more arrays in the order they were provided.
|
static <TOuter,TInner,TKey extends java.lang.Comparable<TKey>,TResult> |
Linq.join(java.lang.Iterable<TOuter> outerValues,
java.lang.Iterable<TInner> innerValues,
Functions.Function1<TOuter,TKey> outerKeySelector,
Functions.Function1<TInner,TKey> innerKeySelector,
Functions.Function2<TOuter,TInner,TResult> resultSelector)
Performs an inner join (more specifically an equi-join) over two sequences.
|
static <T> T[] |
ArrayUtils.join(T[] first,
T[] second)
Joins two arrays in the order they were provided.
|
static <TOuter,TInner,TKey extends java.lang.Comparable<TKey>,TResult> |
Linq.join(TOuter[] outerValues,
TInner[] innerValues,
Functions.Function1<TOuter,TKey> outerKeySelector,
Functions.Function1<TInner,TKey> innerKeySelector,
Functions.Function2<TOuter,TInner,TResult> resultSelector)
Performs an inner join (more specifically an equi-join) over two sequences.
|
static <T> T |
Linq.last(java.lang.Iterable<T> values)
Returns the last element in the iterable.
|
static <T> T |
Linq.last(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns the last element in the provided sequence that matches a condition.
|
static <T> T |
Linq.last(T[] array)
Returns the last element in the array.
|
static <T> T |
Linq.last(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns the last element in the provided sequence that matches a condition.
|
static int |
ByteArrayUtils.lastIndexOf(byte[] data,
byte value)
Returns the last index of a byte encountered within some data.
|
static int |
ByteArrayUtils.lastIndexOf(byte[] data,
byte[] value)
Returns the last index of a byte sequence encountered within some data.
|
static int |
ByteArrayUtils.lastIndexOf(byte[] data,
byte[] value,
int occurrence)
Returns the index of the first/second/third/etc.
|
static int |
ByteArrayUtils.lastIndexOf(byte[] data,
int startIndex,
byte[] value)
Returns the last index of a byte sequence encountered within some data.
|
static int |
StringUtils.lastIndexOf(char[] array,
char ch)
Finds the last index encountered of a particular character.
|
static <T> int |
Linq.lastIndexOf(java.lang.Iterable<? super T> values,
T element)
Returns the last index where the specified element is found.
|
static <T> int |
Linq.lastIndexOf(java.lang.Iterable<T> values,
T element,
java.util.Comparator<? super T> comparer)
Returns the last index where the specified element is found.
|
static int |
StringUtils.lastIndexOf(java.lang.String value,
java.lang.String part,
int startIndex,
int count,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the first, second, third, etc.
|
static int |
StringUtils.lastIndexOf(java.lang.String value,
java.lang.String part,
int startIndex,
int count,
StringComparison stringComparison)
Returns the first, second, third, etc.
|
static int |
StringUtils.lastIndexOf(java.lang.String value,
java.lang.String part,
int occurrenceFromEnd,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the index of the first/second/third/etc.
|
static int |
StringUtils.lastIndexOf(java.lang.String value,
java.lang.String part,
int occurrenceFromEnd,
StringComparison stringComparison)
Returns the index of the first/second/third/etc.
|
static int |
StringUtils.lastIndexOf(java.lang.String value,
java.lang.String part,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Returns the last index where a part is encountered within a string value.
|
static <T> int |
Linq.lastIndexOf(T[] values,
T element)
Returns the last index where the specified element is first found.
|
static <T> int |
Linq.lastIndexOf(T[] values,
T element,
java.util.Comparator<? super T> comparer)
Returns the last index where the specified element is first found.
|
static <T> T |
Linq.lastOrDefault(java.lang.Iterable<T> values)
Returns the last element in the provided sequence.
|
static <T> T |
Linq.lastOrDefault(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns the last element in the provided sequence that matches a condition.
|
static <T> T |
Linq.lastOrDefault(T[] values)
Returns the last element in the provided array.
|
static <T> T |
Linq.lastOrDefault(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns the last element in the provided sequence that matches a condition.
|
static boolean |
ByteArrayUtils.match(byte[] a,
MatchType byteMatch,
byte[] b)
Allows for matching a byte[] to another, using Equals, StartsWith, EndsWith or Contains matching types.
|
static boolean |
StringUtils.match(java.lang.String a,
MatchType stringMatch,
java.lang.String b,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Allows for matching a string to another, using Equals, StartsWith, EndsWith or Contains and a string comparison.
|
static boolean |
StringUtils.match(java.lang.String a,
MatchType stringMatch,
java.lang.String b,
StringComparison stringComparison)
Allows for matching a string to another, using Equals, StartsWith, EndsWith or Contains and a string comparison.
|
static int |
Linq.max(int[] items)
Returns the maximum of the given values.
|
static long |
Linq.max(long[] items)
Returns the maximum of the given values.
|
static <T extends java.lang.Comparable<T>> |
Linq.max(T[] items)
Returns the maximum of the given values.
|
static <T> T |
Linq.maxOccurring(java.lang.Iterable<T> items,
java.util.Comparator<? super T> comparator)
Returns the item with the most occurrences in the given iterable.
|
static <T> T |
Linq.maxOccurring(T[] items,
java.util.Comparator<? super T> comparator)
Returns the item with the most occurrences in the given array.
|
static int |
Linq.min(int[] items)
Returns the minimum of the given values.
|
static long |
Linq.min(long[] items)
Returns the minimum of the given values.
|
static <T extends java.lang.Comparable<T>> |
Linq.min(T[] items)
Returns the minimum of the given values.
|
static <T> T |
Linq.minOccurring(java.lang.Iterable<T> items,
java.util.Comparator<? super T> comparator)
Returns the item with the least occurrences in the given iterable.
|
static <T> T |
Linq.minOccurring(T[] items,
java.util.Comparator<? super T> comparator)
Returns the item with the least occurrences in the given array.
|
static boolean |
FileUtils.moveFile(java.lang.String originatingPath,
java.lang.String destinationPath)
Moves a file from source to destination
|
static <TSource,TDest> |
Linq.ofType(java.lang.Iterable<TSource> values,
java.lang.Class<TDest> destinationClass)
Returns all values in a sequence that are of a particular type.
|
static <TSource,TDest> |
Linq.ofType(TSource[] values,
java.lang.Class<TDest> destinationClass)
Returns all values in a sequence that are of a particular type.
|
static <TKey extends java.lang.Comparable<TKey>,TResult> |
Linq.orderBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector)
Orders a sequence by a specified key.
|
static <TKey extends java.lang.Comparable<TKey>,TResult> |
Linq.orderBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer)
Orders a sequence by a specified key.
|
static <TKey extends java.lang.Comparable<TKey>,TResult> |
Linq.orderBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector)
Orders a sequence by a specified key.
|
static <TKey,TResult> |
Linq.orderBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer)
Orders a sequence by a specified key.
|
static <TKey,TKey2,TResult> |
Linq.orderByThenBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer,
Functions.Function1<? super TResult,TKey2> keySelector2,
java.util.Comparator<? super TKey2> comparer2)
Orders a sequence by a specified key and matching key results get sorted by a second key.
|
static <TKey extends java.lang.Comparable<TKey>,TKey2 extends java.lang.Comparable<TKey2>,TResult> |
Linq.orderByThenBy(java.lang.Iterable<TResult> values,
Functions.Function1<? super TResult,TKey> keySelector,
Functions.Function1<? super TResult,TKey2> keySelector2)
Orders a sequence by a specified key and matching key results get sorted by a second key.
|
static <TKey,TKey2,TResult> |
Linq.orderByThenBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector,
java.util.Comparator<? super TKey> comparer,
Functions.Function1<TResult,TKey2> keySelector2,
java.util.Comparator<? super TKey2> comparer2)
Orders a sequence by a specified key and matching key results get sorted by a second key.
|
static <TKey extends java.lang.Comparable<TKey>,TKey2 extends java.lang.Comparable<TKey2>,TResult> |
Linq.orderByThenBy(TResult[] values,
Functions.Function1<TResult,TKey> keySelector,
Functions.Function1<TResult,TKey2> keySelector2)
Orders a sequence by a specified key and matching key results get sorted by a second key.
|
static java.lang.String |
StringUtils.padLeft(java.lang.String value,
int totalLength,
char pad)
Left-aligns the characters in this instance, padding on the right a specified character
|
static java.lang.String |
StringUtils.padRight(java.lang.String value,
int totalLength,
char pad)
Right-aligns the characters in this instance, padding on the left a specified character
|
static java.lang.Class<?> |
ReflectionUtils.parse(java.lang.String value)
Parses a class from a string.
|
static <T> java.lang.Class<T> |
ReflectionUtils.parse(java.lang.String value,
java.lang.Class<T> baseType)
Parses a class from a string.
|
static boolean |
StringUtils.parseBool(java.lang.String value,
java.lang.String trueValue,
java.lang.String falseValue,
StringComparison comparisonType)
Parses a boolean from a string
|
static char |
StringUtils.parseChar(java.lang.String value,
char minValue,
char maxValue)
Parses the first character from a string
|
static org.joda.time.LocalDateTime |
StringUtils.parseDateTime(java.lang.String value)
Parses a DateTime from a string.
|
static org.joda.time.LocalDateTime |
StringUtils.parseDateTime(java.lang.String value,
org.joda.time.LocalDateTime minValue,
org.joda.time.LocalDateTime maxValue,
org.joda.time.format.DateTimeFormatter formatter)
Parses a DateTime from a string
|
static java.math.BigDecimal |
StringUtils.parseDecimal(java.lang.String value)
Parses a decimal from a string
|
static java.math.BigDecimal |
StringUtils.parseDecimal(java.lang.String value,
java.math.BigDecimal minValue,
java.math.BigDecimal maxValue)
Parses a decimal from a string
|
static double |
StringUtils.parseDouble(java.lang.String value,
double minValue,
double maxValue,
boolean allowInfinity,
boolean allowNaN)
Parses a double from a string
|
static float |
StringUtils.parseFloat(java.lang.String value,
float minValue,
float maxValue,
boolean allowInfinity,
boolean allowNaN)
Parses a float from a string
|
static Int128 |
StringUtils.parseInt128(java.lang.String value,
Int128 minValue,
Int128 maxValue)
Parses an Int128 from a string
|
static short |
StringUtils.parseInt16(java.lang.String value,
short minValue,
short maxValue)
Parses a short from a string
|
static int |
StringUtils.parseInt32(java.lang.String value,
int minValue,
int maxValue)
Parses an int from a string
|
static long |
StringUtils.parseInt64(java.lang.String value,
long minValue,
long maxValue)
Parses a long from a string
|
static byte |
StringUtils.parseInt8(java.lang.String value,
byte minValue,
byte maxValue)
Parses a byte from a string
|
static java.lang.String |
StringUtils.parseString(java.lang.String value)
Parses the value of the given string: simply returns the string after checking for null.
|
static org.joda.time.Duration |
StringUtils.parseTimeSpan(java.lang.String value,
org.joda.time.Duration minValue,
org.joda.time.Duration maxValue)
Parses a TimeSpan from a string.
|
static UnsignedShort |
StringUtils.parseUInt16(java.lang.String value,
UnsignedShort minValue,
UnsignedShort maxValue)
Parses a ushort from a string
|
static UnsignedInteger |
StringUtils.parseUInt32(java.lang.String value,
UnsignedInteger minValue,
UnsignedInteger maxValue)
Parses a uint from a string
|
static UnsignedLong |
StringUtils.parseUInt64(java.lang.String value,
UnsignedLong minValue,
UnsignedLong maxValue)
Parses a ulong from a string
|
static UnsignedByte |
StringUtils.parseUInt8(java.lang.String value,
UnsignedByte minValue,
UnsignedByte maxValue)
Parses an sbyte from a string
|
static <T> Pair<java.lang.Iterable<T>,java.lang.Iterable<T>> |
Linq.partition(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Partitions the given values based on a predicate.
|
static <T> Pair<T[],T[]> |
Linq.partition(T[] values,
Predicates.Predicate1<T> predicate)
Partitions the given values based on a predicate.
|
static char |
StreamUtils.peekCharacter(java.io.Reader textStream)
Peeks the next stream character, if any.
|
static void |
FileUtils.performCreateReadWriteDeleteAccess(java.lang.String folderName)
Tests access rights on a folder.
|
static <T> T[] |
ArrayUtils.prepend(T[] array,
T element)
Adds an element to the given array, at position 0
|
static <T> T |
ReflectionUtils.proxy(java.lang.Object obj,
java.lang.Class<T> interfaceType)
Quick-and-dirty proxy-ing utility method, allows dynamic dispatch on any object using a specified interface.
|
static <T> T |
ReflectionUtils.proxy(java.lang.Object obj,
java.lang.Class<T> interfaceType,
java.lang.String[] suppressedMethodNames)
Overloaded variation of the above method, which allows certain methods to be prevented from being called.
|
static <T> void |
RandomUtils.pseudoRandomize(java.util.List<T> data,
int start,
int end)
Randomizes elements in an array.
|
static <T> void |
RandomUtils.pseudoRandomize(T[] data,
int start,
int end)
Randomizes elements in an array.
|
static <T> java.lang.Iterable<T> |
Linq.range(java.lang.Iterable<T> values,
int start,
int finish)
Returns a range from the provided sequence.
|
static <T> T[] |
Linq.range(T[] values,
int start,
int finish)
Returns a range from the provided sequence.
|
static <T> java.lang.Iterable<T> |
Linq.range(T start,
Predicates.Predicate1<? super T> predicate,
Functions.Function1<T,T> stepFunction)
Returns a range of values, by using a step function, until the predicate returns false
|
static <T> java.lang.Iterable<T> |
Linq.range(T start,
T end,
Functions.Function1<T,T> stepFunction)
Returns a range of values, from start to end (exclusive).
|
static java.lang.String |
StreamUtils.readAllCharacters(java.io.InputStream stream,
java.nio.charset.Charset streamEncoding)
Blocks until all bytes are read from the stream, returns the decoded data using the specified encoding.
|
static java.lang.String |
StreamUtils.readAllCharacters(java.io.Reader textStream)
Reads all characters from a stream, returning a string.
|
static char |
StreamUtils.readCharacter(java.io.InputStream stream,
java.nio.charset.Charset streamEncoding)
Reads the next character from a byte-stream, if any, decoding bytes into the specified encoding's decoder e.g.
|
static char |
StreamUtils.readCharacter(java.io.Reader textStream)
Reads the next stream character, if any.
|
static byte[] |
FileUtils.readFileInMemory(java.io.File file)
Reads the entire contents of a file to a byte[] and returns it.
|
static byte[] |
FileUtils.readFileInMemory(java.lang.String fileAbsPath)
Reads the entire contents of a file to a byte[] and returns it.
|
static java.lang.Iterable<byte[]> |
FileUtils.readFilePerBlock(java.io.File file,
int blockSize)
Enumerates the contents of a file line by line (reads the entire contents of a file in memory to do so).
|
static java.lang.Iterable<byte[]> |
FileUtils.readFilePerBlock(java.lang.String fileAbsPath,
int blockSize)
Enumerates the contents of a file line by line (reads the entire contents of a file in memory to do so).
|
static java.lang.Iterable<java.lang.String> |
FileUtils.readFilePerLine(java.io.File file)
Enumerates the contents of a file line by line (reads the entire contents of a file in memory to do so).
|
static java.lang.Iterable<java.lang.String> |
FileUtils.readFilePerLine(java.lang.String fileAbsPath)
Enumerates the contents of a file line by line.
|
static java.lang.String |
FileUtils.readFileToEnd(java.io.File file)
Reads the entire contents of a file to a string and returns it.
|
static java.lang.String |
FileUtils.readFileToEnd(java.lang.String fileAbsPath)
Reads the entire contents of a file to a string and returns it.
|
static void |
StreamUtils.readFully(java.io.InputStream stream,
byte[] buffer,
long length)
Blocks until a specified amount of bytes is read from a stream.
|
static void |
StreamUtils.readFully(java.io.InputStream stream,
byte[] buffer,
long length,
int maxChunkSize)
Blocks until a specified amount of bytes is read from a stream.
|
static byte[] |
StreamUtils.readFully(java.io.InputStream stream,
long length)
Blocks until a specified amount of bytes is read from a stream.
|
static byte[] |
StreamUtils.readFully(java.io.InputStream stream,
long length,
int maxChunkSize)
Blocks until a specified amount of bytes is read from a stream.
|
static byte[] |
StreamUtils.readUntil(java.io.InputStream stream,
byte terminator)
Reads data from the stream until a terminator byte is found.
|
static byte[] |
StreamUtils.readUntil(java.io.InputStream stream,
byte[] terminator)
Reads data from the byte-stream until a terminator string is found.
|
static java.lang.String |
StreamUtils.readUntil(java.io.InputStream stream,
byte[] terminator,
java.nio.charset.Charset streamEncoding)
Reads a string from the byte-stream with the specified encoding until a terminator string is found.
|
static java.lang.String |
StreamUtils.readUntil(java.io.InputStream stream,
char terminator,
java.nio.charset.Charset streamEncoding)
Reads a string from the stream until a terminator character is found.
|
static java.lang.String |
StreamUtils.readUntil(java.io.InputStream stream,
java.lang.String terminator,
java.nio.charset.Charset streamEncoding)
Reads a string from the byte-stream with the specified encoding until a terminator string is found.
|
static java.lang.String |
StreamUtils.readUntil(java.io.Reader textStream,
java.lang.String terminator)
Reads a string from the stream until a terminator string is found.
|
static <T> T[] |
ArrayUtils.remove(T[] array,
int index)
Removes the element at the given position from the given array.
|
static <T> T[] |
ArrayUtils.remove(T[] array,
T element)
Removes the first encounter of element from the given array, returning an new array if found.
|
static <T> T[] |
ArrayUtils.removeAll(T[] array,
T element)
Removes all occurences of element from the given array, returning an new array if found.
|
static java.lang.String |
StringUtils.repeat(java.lang.String value,
int repetitions)
Returns a number of ToString() result concatenations of the given string value.
|
static <T> java.lang.Iterable<T> |
Linq.repeat(T value,
int count)
Returns a collection of specified size
|
static void |
StringUtils.replace(java.lang.StringBuilder builder,
java.lang.String textToReplace,
java.lang.String replaceWithText)
Replace method working on a string builder, for more efficient replacement.
|
static java.lang.String |
StringUtils.replace(java.lang.String value,
java.lang.String textToReplace,
java.lang.String replaceWithText,
java.util.Locale locale,
java.text.Collator collator,
boolean caseSensitive)
Replaces text in a value with the specified replacement text, using the given string comparison type.
|
static java.lang.String |
StringUtils.replace(java.lang.String value,
java.lang.String textToReplace,
java.lang.String replaceWithText,
StringComparison stringComparison)
Replaces text in a value with the specified replacement text, using the given string comparison type.
|
static byte[] |
ByteArrayUtils.resize(byte[] array,
int length)
Re-sizes an array to the specified size.
|
static <T> T[] |
ArrayUtils.resize(T[] array,
int length)
Re-sizes an array to the specified size.
|
static byte[] |
ByteArrayUtils.reverse(byte[] array)
Reverses an array (in place)
|
static <T> java.lang.Iterable<T> |
Linq.reverse(java.lang.Iterable<T> values)
Returns a reversed version of the provided sequence
|
static <T> java.util.List<T> |
Linq.reverse(java.util.List<T> values)
Returns a reversed version of the provided sequence
|
static <T> ReifiedList<T> |
Linq.reverse(ReifiedIterable<T> values)
Returns a reversed version of the provided sequence
|
static java.lang.String |
StringUtils.reverse(java.lang.String value)
Reverses a string.
|
static <T> T[] |
Linq.reverse(T[] values)
Returns a reversed version of the provided array
|
static <T> T[] |
ArrayUtils.reverse(T[] array)
Reverses an array (in place)
|
static byte[] |
ByteArrayUtils.reverseCopy(byte[] array)
Reverses an array (creates a new copy)
|
static <T> T[] |
ArrayUtils.reverseCopy(T[] array)
Reverses an array (creates a new copy)
|
static java.util.List<java.lang.String> |
FileUtils.scanPath(java.lang.String path,
ScanInclusionMode inclusionMode,
ScanHiddenMode hiddenMode,
ScanDepthMode depthMode,
ScanSortMode sortMode,
ScanFailMode failMode,
java.util.List<ScanErrorEntry> collectedScanErrors)
Scans a directory path for files and folders, using the specified configuration.
|
static <TSource,TResult> |
Linq.select(java.lang.Iterable<TSource> values,
Functions.Function1<? super TSource,TResult> selector)
Acts as a Select LINQ function.
|
static <TSource,TResult> |
Linq.select(TSource[] values,
Functions.Function1<TSource,TResult> selector)
Acts as a Select LINQ function.
|
static <TSource,TResult> |
Linq.selectMany(java.lang.Iterable<TSource> values,
Functions.Function1<? super TSource,java.util.List<TResult>> selector)
Acts as a SelectMany LINQ function, to allow selection of iterables and return all their sub-items.
|
static <TSource,TResult> |
Linq.selectMany(TSource[] values,
Functions.Function1<TSource,ReifiedList<TResult>> selector)
Acts as a SelectMany LINQ function, to allow selection of iterables and return all their sub-items.
|
static boolean |
ByteArrayUtils.sequenceEqual(byte[] a,
byte[] b)
Returns true if the byte sequences within two arrays are equal.
|
static boolean |
ByteArrayUtils.sequenceEqual(byte[] a,
int startIndexA,
byte[] b,
int startIndexB,
int count)
Returns true if the byte sequences within two arrays are equal
|
static boolean |
StringUtils.sequenceEqual(char[] a,
char[] b)
Returns true if two character sequences are equal
|
static boolean |
StringUtils.sequenceEqual(char[] a,
int startIndexA,
char[] b,
int startIndexB,
int count)
Returns true if two character sequences are equal
|
static <T> boolean |
Linq.sequenceEqual(java.lang.Iterable<? super T> values1,
java.lang.Iterable<T> values2)
Returns true if both iterables have the same values in the exact same positions.
|
static <T> boolean |
Linq.sequenceEqual(java.util.List<T> a,
int offsetA,
java.util.List<T> b,
int offsetB,
int count)
Returns true if the item sequences within two arrays are equal.
|
static <T> boolean |
Linq.sequenceEqual(T[] a,
int offsetA,
T[] b,
int offsetB,
int count)
Returns true if the item sequences within two arrays are equal.
|
static <T> boolean |
Linq.sequenceEqual(T[] values1,
T[] values2)
Returns true if both iterables have the same values in the exact same positions.
|
static boolean |
EnvironmentUtils.setEnv(java.util.Map<java.lang.String,java.lang.String> newenv)
Replaces the environment variables map with the provided one
|
static java.lang.String |
EnvironmentUtils.setEnv(java.lang.String name,
java.lang.String value)
Overwrites an environment variable for this JVM, returning the old value
|
static byte[] |
ByteArrayUtils.shiftLeft(byte[] data,
int count)
Obfuscation-oriented byte shifting function, shifts individual bytes left, does not check for or handles overflow.
|
static byte[] |
ByteArrayUtils.shiftRight(byte[] data,
int count)
Obfuscation-oriented byte shifting function, shifts individual bytes right, does not check for or handles overflow.
|
static <T> T |
Linq.single(java.lang.Iterable<T> values)
Throws an exception if the given Iterable does not have a single element (e.g.
|
static <T> T |
Linq.single(T[] values)
Throws an exception if the given Iterable does not have a single element (e.g.
|
static <T> java.lang.Iterable<T> |
Linq.skip(java.lang.Iterable<T> values,
int count)
Skips up to the specified number of elements in the given sequence.
|
static <T> T[] |
Linq.skip(T[] values,
int count)
Skips up to the specified number of elements in the given sequence.
|
static void |
StreamUtils.skipCharacters(java.io.InputStream stream,
int count,
java.nio.charset.Charset streamEncoding)
Skips a specified number of characters from the byte-stream, using the specified encoding to convert bytes into characters.
|
static void |
StreamUtils.skipUntil(java.io.InputStream stream,
byte terminator)
Blocks until the specified byte is encountered and all bytes read until then are skipped.
|
static void |
StreamUtils.skipUntil(java.io.InputStream stream,
byte[] terminator)
Blocks until the specified byte sequence is encountered and all bytes read until then are skipped.
|
static void |
StreamUtils.skipUntil(java.io.InputStream stream,
java.lang.String terminator,
java.nio.charset.Charset streamEncoding)
Blocks until the specified string of characters is encountered and all characters read until then from the UTF8-encoded byte-stream are
skipped.
|
static <T> java.lang.Iterable<T> |
Linq.skipWhile(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Skips items in the sequence for which a predicate is true, returning the rest.
|
static <T> T[] |
Linq.skipWhile(T[] values,
Predicates.Predicate1<T> predicate)
Skips items in the sequence for which a predicate is true, returning the rest.
|
static <T extends java.lang.Comparable<T>> |
Linq.sort(java.lang.Iterable<T> values)
Sorts a sequence.
|
static <T> java.util.List<T> |
Linq.sort(java.lang.Iterable<T> values,
java.util.Comparator<? super T> comparator)
Sorts a sequence.
|
static <T extends java.lang.Comparable<T>> |
Linq.sort(java.util.List<T> values)
Sorts a list
|
static <T extends java.lang.Comparable<T>> |
Linq.sort(java.util.List<T> values,
java.util.Comparator<? super T> comparator)
Sorts a list
|
static <T extends java.lang.Comparable<T>> |
Linq.sort(ReifiedIterable<T> values)
Sorts a sequence.
|
static java.util.List<byte[]> |
ByteArrayUtils.split(byte[] data,
byte[] separator)
Splits a byte array into parts using the given separator.
|
static java.util.List<byte[]> |
ByteArrayUtils.split(byte[] data,
byte[] separator,
StringSplitOptions options)
Splits a byte array into parts using the given separator.
|
static java.util.List<char[]> |
StringUtils.split(char[] values,
char delimiter)
Splits a sequence into parts delimited by the specified delimited.
|
static <T> java.util.List<T>[] |
Linq.split(java.lang.Iterable<? extends T> values,
T delimiter)
Splits a sequence into parts delimited by the specified delimited.
|
static <T> java.util.List<T>[] |
Linq.split(java.lang.Iterable<T> values,
T delimiter,
java.util.Comparator<? super T> comparer)
Splits a sequence into parts delimited by the specified delimited.
|
static java.lang.String[] |
StringUtils.split(java.lang.String text,
char[] delimiters,
StringSplitOptions options)
Returns a string array that contains the substrings of the text instance that are delimited by elements of a specified Unicode
character array.
|
static java.lang.String[] |
StringUtils.split(java.lang.String text,
java.lang.String[] delimiters,
StringSplitOptions options)
Returns a string array that contains the substrings of the text instance that are delimited by elements provided in the specified
Unicode string array.
|
static java.lang.String[] |
StringUtils.split(java.lang.String text,
java.lang.String delimiter,
StringSplitOptions options)
Splits a string using the specified split option.
|
static <T> java.util.List<T>[] |
Linq.split(T[] values,
T delimiter)
Splits a sequence into parts delimited by the specified delimited.
|
static <T> java.util.List<T>[] |
Linq.split(T[] values,
T delimiter,
java.util.Comparator<? super T> comparer)
Splits a sequence into parts delimited by the specified delimited.
|
static java.lang.String[] |
StringUtils.splitAnchor(java.lang.String text,
java.lang.Iterable<java.lang.String> delimiters)
Splits a string by finding consecutive 'tags' i.e.
|
static java.lang.String[] |
StringUtils.splitAnchor(java.lang.String text,
java.lang.String[] delimiters)
Splits a string by finding consecutive 'tags' i.e.
|
static boolean |
ByteArrayUtils.startsWith(byte[] data,
byte[] value)
Returns true if the given byte sequence in data starts with the bytes found in value.
|
static boolean |
StringUtils.startsWith(java.lang.String value,
char prefix)
Returns true if the value starts with a prefix.
|
static byte[] |
ByteArrayUtils.subarray(byte[] buffer,
int startIndex,
int length)
Returns a sub-array of the given array
|
static <T> T[] |
ArrayUtils.subArray(T[] array,
int startIndex,
int endIndex)
Returns a sub-array of the given array
|
static java.lang.String |
StringUtils.substring(java.lang.String value,
int startIndex,
int length)
Similar to String.Substring of .NET, uses a length instead of endIndex.
|
static void |
ByteArrayUtils.swap(byte[] array,
int a,
int b)
Swaps two elements in an array.
|
static <T> void |
Linq.swap(java.util.List<T> list,
int[] a,
int[] b)
Swaps two or more elements in an array
|
static <T> void |
Linq.swap(java.util.List<T> list,
int a,
int b)
Swaps two elements in a list
|
static <T> void |
Linq.swap(T[] array,
int[] a,
int[] b)
Swaps two or more elements in an array.
|
static <T> void |
Linq.swap(T[] array,
int a,
int b)
Swaps two elements in an array.
|
static <T> java.lang.Iterable<T> |
Linq.take(java.lang.Iterable<T> values,
int count)
Returns up to the specified number of elements from the given sequence.
|
static <T> T[] |
Linq.take(T[] values,
int count)
Returns up to the specified number of elements from the given sequence.
|
static <T> java.lang.Iterable<T> |
Linq.takeWhile(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns items in the sequence while a predicate is true.
|
static <T> T[] |
Linq.takeWhile(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns items in the sequence while a predicate is true.
|
static java.lang.String |
StringUtils.titleCase(java.lang.String value)
Title-cases a string
|
static java.lang.String |
ConversionUtils.toAlphanumeric(byte[] ba)
Converts a byte array to alphanumeric
|
static java.lang.String |
ConversionUtils.toAlphanumeric(byte[] ba,
int offset,
int length)
Converts a byte array to alphanumeric
|
static java.lang.String |
ConversionUtils.toAlphanumeric(UnsignedLong num)
Converts a number to alphanumeric, e.g.
|
static java.lang.String |
ConversionUtils.toAlphanumeric(UnsignedLong num,
boolean padLeft)
Converts a number to alphanumeric, e.g.
|
static <T> T[] |
Linq.toArray(java.util.Collection<T> list,
java.lang.Class<?> componentType)
Converts a collection to an array.
|
static <T> T[] |
Linq.toArray(java.util.Enumeration<T> enumeration,
java.lang.Class<?> componentType)
Converts an enumeration to an array.
|
static <T> T[] |
Linq.toArray(java.lang.Iterable<T> values,
java.lang.Class<?> componentType)
Converts an iterable to an array.
|
static <T> T[] |
Linq.toArray(ReifiedIterable<T> values)
Converts an iterable to an array.
|
static <T> T[] |
Linq.toArray(ReifiedList<T> list)
Converts a list to an array.
|
static <T,TKey extends java.lang.Comparable<TKey>,TValue> |
Linq.toAvlHashtable(java.lang.Iterable<T> values,
Functions.Function1<T,TKey> keySelector,
Functions.Function1<T,TValue> valueSelector)
Converts a sequence of items into a key/value AVL tree.
|
static <T,TKey extends java.lang.Comparable<TKey>,TValue> |
Linq.toAvlHashtable(T[] values,
Functions.Function1<T,TKey> keySelector,
Functions.Function1<T,TValue> valueSelector)
Converts a sequence of items into a key/value AVL hashtable.
|
static java.lang.String |
ConversionUtils.toBase64(byte[] array,
int offset,
int length)
Converts a byte array to Base64.
|
static java.lang.String |
ConversionUtils.toBinary(byte[] bytes)
Converts a byte array to a binary string.
|
static java.lang.String |
ConversionUtils.toBinary(byte[] bytes,
int startIndex,
int length)
Converts a byte array to a binary string.
|
static java.lang.String |
ConversionUtils.toBinary(UnsignedByte num,
boolean padLeft)
Converts a number to binary, e.g.
|
static java.lang.String |
ConversionUtils.toBinary(UnsignedInteger num)
Converts a number to binary, e.g.
|
static java.lang.String |
ConversionUtils.toBinary(UnsignedInteger num,
boolean padLeft)
Converts a number to binary, e.g.
|
static java.lang.String |
ConversionUtils.toBinary(UnsignedLong num,
boolean padLeft)
Converts a number to binary, e.g.
|
static java.lang.String |
ConversionUtils.toBinary(UnsignedShort num,
boolean padLeft)
Converts a number to binary, e.g.
|
static byte[] |
ConversionUtils.toByteArray(java.lang.String text)
Converts a UTF8-encoded string to a byte[]
|
static byte[] |
ConversionUtils.toByteArray(java.lang.String text,
java.nio.charset.Charset encoding)
Converts a string to a byte[]
|
static byte[] |
ConversionUtils.toByteArray(java.lang.String text,
java.nio.charset.Charset encoding,
int index,
int count)
Converts a string to a byte[]
|
static byte[] |
ConversionUtils.toByteArray(java.lang.String text,
int index,
int count)
Converts a UTF8-encoded string to a byte[]
|
static <T> void |
ArrayUtils.toCollection(T[] from,
java.util.Collection<T> to)
Puts all elements from an array to a collection
|
static java.lang.String |
ConversionUtils.toHex(byte[] ba)
Converts a byte array to hex Hex representations can be endian dependent.
|
static java.lang.String |
ConversionUtils.toHex(byte[] ba,
int offset,
int length)
Converts a byte array to hex Hex representations can be endian dependent.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedByte num)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedByte num,
boolean padLeft)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedInteger num)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedInteger num,
boolean padLeft)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedLong num)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedLong num,
boolean padLeft)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedShort num)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHex(UnsignedShort num,
boolean padLeft)
Converts a number to hex, e.g.
|
static java.lang.String |
ConversionUtils.toHumanReadable(java.math.BigDecimal number)
Returns the value of the given number in a human-readable form.
|
static java.lang.String |
ConversionUtils.toHumanReadable(java.math.BigDecimal number,
int decimalPlaces)
Returns the value of the given number in a human-readable form.
|
static java.lang.String |
ConversionUtils.toHumanReadable(org.joda.time.Duration ts)
Returns the value of the given timespan in a human-readable form, appending the suffix.
|
static java.lang.String |
ConversionUtils.toHumanReadable(org.joda.time.Duration ts,
java.lang.String suffix)
Returns the value of the given timespan in a human-readable form, appending the suffix.
|
static java.lang.String |
ConversionUtils.toHumanReadable(org.joda.time.Period p) |
static short |
ByteArrayUtils.toInt16(byte[] value)
Inverse function of GetBytes(short)
|
static int |
ByteArrayUtils.toInt32(byte[] value)
Inverse function of GetBytes(int)
|
static long |
ByteArrayUtils.toInt64(byte[] value)
Inverse function of GetBytes(long)
|
static <T> ReifiedLinkedList<T> |
ArrayUtils.toLinkedList(T[] array)
Returns the given array as a LinkedList (a class operating as a Queue or Stack).
|
static <T> java.util.List<T> |
Linq.toList(java.util.Enumeration<? extends T> enumeration)
Converts an enumeration to a list
|
static <T> ReifiedList<T> |
Linq.toList(java.util.Enumeration<T> enumeration,
java.lang.Class<?> genericTypeParameter)
Converts an enumeration to a list
|
static <T> java.util.List<T> |
Linq.toList(java.lang.Iterable<? extends T> values)
Converts an Iterable to a list
|
static <T> ReifiedList<T> |
Linq.toList(java.lang.Iterable<T> values,
java.lang.Class<?> genericTypeParameter)
Converts an iterable to a list
|
static <T> ReifiedList<T> |
Linq.toList(ReifiedIterable<T> values)
Converts an iterable to a list
|
static <T> ReifiedList<T> |
Linq.toList(T[] values)
Converts an array to a list
|
static <T> ReifiedList<T> |
ArrayUtils.toList(T[] array)
Converts an array to a list.
|
static <K,V> java.util.concurrent.ConcurrentMap<K,V> |
ImmutableUtils.toReadOnly(java.util.concurrent.ConcurrentMap<K,V> map)
Returns a read-only version of the given collection
|
static <T> java.util.Deque<T> |
ImmutableUtils.toReadOnly(java.util.Deque<T> deque)
Returns a read-only version of the given collection
|
static <K extends java.lang.Comparable<K>,V> |
ImmutableUtils.toReadOnly(IHashtable<K,V> map)
Returns a read-only version of the given collection
|
static <K extends java.lang.Comparable<K>,V> |
ImmutableUtils.toReadOnly(IListMap<K,V> map)
Returns a read-only version of the given collection
|
static <V> ILongHashMap<V> |
ImmutableUtils.toReadOnly(ILongHashMap<V> map)
Returns a read-only version of the given collection
|
static <T extends java.lang.Comparable<? super T>,K extends java.lang.Comparable<? super K>,V> |
ImmutableUtils.toReadOnly(IMapMultimap<T,K,V> map)
Returns a read-only version of the given collection
|
static <K extends java.lang.Comparable<K>,V> |
ImmutableUtils.toReadOnly(ISharedHashtable<K,V> map)
Returns a read-only version of the given collection
|
static <T> ISharedList<T> |
ImmutableUtils.toReadOnly(ISharedList<T> list)
Returns a read-only version of the given collection
|
static <T extends java.lang.Comparable<? super T>,K extends java.lang.Comparable<? super K>,V> |
ImmutableUtils.toReadOnly(ISharedMapMultimap<T,K,V> map)
Returns a read-only version of the given collection
|
static <T> java.util.List<T> |
ImmutableUtils.toReadOnly(java.util.List<T> list)
Returns a read-only version of the given collection
|
static <K,V> java.util.Map<K,V> |
ImmutableUtils.toReadOnly(java.util.Map<K,V> map)
Returns a read-only version of the given collection
|
static <T> java.util.Queue<T> |
ImmutableUtils.toReadOnly(java.util.Queue<T> queue)
Returns a read-only version of the given collection
|
static <T> ReifiedArray<T> |
ImmutableUtils.toReadOnly(ReifiedArray<T> array)
Returns a read-only version of the given collection
|
static <T> ReifiedList<T> |
ImmutableUtils.toReadOnly(ReifiedList<T> list)
Returns a read-only version of the given collection
|
static <T extends java.lang.Comparable<T>> |
ImmutableUtils.toReadOnly(ReifiedSet<T> set)
Returns a read-only version of the given collection
|
static <T> java.util.Set<T> |
ImmutableUtils.toReadOnly(java.util.Set<T> set)
Returns a read-only version of the given collection
|
static <T extends java.lang.Comparable<T>> |
ArrayUtils.toSortedList(T[] array)
Returns the given array as a PriorityQueue.
|
static <T extends java.lang.Comparable<T>> |
ArrayUtils.toSortedList(T[] array,
java.util.Comparator<? super T> comparator)
Returns the given array as a PriorityQueue.
|
static java.lang.String |
ConversionUtils.toString(byte[] ba)
Converts a byte array to a UTF8-encoded string
|
static java.lang.String |
ConversionUtils.toString(byte[] ba,
java.nio.charset.Charset encoding)
Converts a byte array to an encoded string
|
static java.lang.String |
ConversionUtils.toString(byte[] ba,
java.nio.charset.Charset encoding,
int index,
int count)
Converts a byte array to an encoded string
|
static java.lang.String |
ConversionUtils.toString(byte[] ba,
int index,
int count)
Converts a byte array to a UTF8-encoded string
|
static void |
FileUtils.touchDirectory(java.io.File dirAbsPath)
Touches a directory, i.e.
|
static void |
FileUtils.touchFile(java.io.File file)
Touches a file, i.e.
|
static void |
FileUtils.touchFile(java.lang.String fileAbsPath)
Touches a file, i.e.
|
static UnsignedShort |
ByteArrayUtils.toUInt16(byte[] value)
Inverse function of GetBytes(UnsignedShort)
|
static UnsignedInteger |
ByteArrayUtils.toUInt32(byte[] value)
Inverse function of GetBytes(UnsignedInteger)
|
static UnsignedLong |
ByteArrayUtils.toUInt64(byte[] value)
Inverse function of GetBytes(UnsignedLong)
|
static javax.xml.datatype.Duration |
ConversionUtils.toXMLDuration(org.joda.time.Duration value)
Converts a Joda Duration object to an XML Duration data type
|
static javax.xml.datatype.XMLGregorianCalendar |
ConversionUtils.toXMLGregorianCalendar(org.joda.time.LocalDateTime value)
Converts a Joda LocalDateTime object to an XML Gregorian Calendar data type
|
static java.lang.String |
StringUtils.trimEnd(java.lang.String value,
char ch)
Trims a value's tail of all the instance of the given char.
|
static java.lang.String |
StringUtils.trimEnd(java.lang.String value,
char[] chars)
Trims a value's tail of all the given chars.
|
static java.lang.String |
StringUtils.trimEnd(java.lang.String value,
java.lang.String trimmed,
StringComparison stringComparison)
Trims a value using the trimmed string.
|
static java.lang.String |
StringUtils.trimStart(java.lang.String value,
char ch)
Trims a value's beginning of all instances of the given char.
|
static java.lang.String |
StringUtils.trimStart(java.lang.String value,
char[] chars)
Trims a value's beginning of all the given chars.
|
static java.lang.String |
StringUtils.trimStart(java.lang.String value,
java.lang.String trimmed,
StringComparison stringComparison)
Trims a value using the trimmed string.
|
static java.lang.String |
StringUtils.truncate(java.lang.String value,
int endIndex)
Cuts the tail of a string, at the specified index.
|
static java.lang.String |
StringUtils.truncateIfLonger(java.lang.String value,
int endIndex)
Cuts the tail of a string, if it exceeds a specified index, otherwise does nothing.
|
static boolean[] |
ArrayUtils.unbox(java.lang.Boolean[] booleans)
Converts a Boolean sequence to primitive boolean[].
|
static byte[] |
ArrayUtils.unbox(java.lang.Byte[] bytes)
Converts a Byte sequence to primitive byte[].
|
static char[] |
ArrayUtils.unbox(java.lang.Character[] characters)
Converts a Character sequence to primitive char[].
|
static double[] |
ArrayUtils.unbox(java.lang.Double[] doubles)
Converts a Double sequence to primitive double[].
|
static float[] |
ArrayUtils.unbox(java.lang.Float[] longs)
Converts a Float sequence to primitive float[].
|
static int[] |
ArrayUtils.unbox(java.lang.Integer[] ints)
Converts a Integer sequence to primitive int[].
|
static long[] |
ArrayUtils.unbox(java.lang.Long[] longs)
Converts a Long sequence to primitive long[].
|
static short[] |
ArrayUtils.unbox(java.lang.Short[] shorts)
Converts a Short sequence to primitive short[].
|
static boolean[] |
ArrayUtils.unboxBools(java.lang.Iterable<java.lang.Boolean> booleans)
Converts a Boolean sequence to primitive boolean[].
|
static byte[] |
ArrayUtils.unboxBytes(java.lang.Iterable<java.lang.Byte> bytes)
Converts a Byte sequence to primitive byte[].
|
static char[] |
ArrayUtils.unboxChars(java.lang.Iterable<java.lang.Character> characters)
Converts a Character sequence to primitive char[].
|
static double[] |
ArrayUtils.unboxDoubles(java.lang.Iterable<java.lang.Double> doubles)
Converts a Double sequence to primitive double[].
|
static float[] |
ArrayUtils.unboxFloats(java.lang.Iterable<java.lang.Float> floats)
Converts a Float sequence to primitive float[].
|
static int[] |
ArrayUtils.unboxInts(java.lang.Iterable<java.lang.Integer> ints)
Converts a Integer sequence to primitive int[].
|
static long[] |
ArrayUtils.unboxLongs(java.lang.Iterable<java.lang.Long> longs)
Converts a Long sequence to primitive long[].
|
static short[] |
ArrayUtils.unboxShorts(java.lang.Iterable<java.lang.Short> shorts)
Converts a Short sequence to primitive short[].
|
static void |
ExceptionUtils.unchecked(Actions.Action0 action)
Executes the given block of code using sneaky throws
|
static void |
ExceptionUtils.uncheckedThrow(java.lang.Throwable e)
Throws an exception as unchecked exception
|
static <T> java.lang.Iterable<T> |
Linq.union(java.lang.Iterable<T> first,
java.lang.Iterable<T> second)
Produces the union of two sequences.
|
static <T> java.lang.Iterable<T> |
Linq.union(java.lang.Iterable<T> first,
java.lang.Iterable<T> second,
java.util.Comparator<? super T> comparer)
Produces the union of two sequences.
|
static <T> T[] |
Linq.union(T[] first,
T[] second)
Produces the union of two sequences.
|
static <T> T[] |
Linq.union(T[] first,
T[] second,
java.util.Comparator<? super T> comparer)
Produces the union of two sequences.
|
static <T,TResult1,TResult2> |
Linq.unzip(java.lang.Iterable<T> values,
Functions.Function1<? super T,Pair<TResult1,TResult2>> func)
Performs the reverse operation to zip()
|
static <T,TResult1,TResult2> |
Linq.unzip(T[] values,
Functions.Function1<T,Pair<TResult1,TResult2>> func)
Performs the reverse operation to zip()
|
static <T> java.lang.Iterable<T> |
Linq.where(java.lang.Iterable<T> values,
Predicates.Predicate1<? super T> predicate)
Returns a subset of the provided sequence, which conforms to the given predicate i.e.
|
static <T> T[] |
Linq.where(T[] values,
Predicates.Predicate1<? super T> predicate)
Returns a subset of the provided sequence, which conforms to the given predicate i.e.
|
static void |
StreamUtils.writeFully(java.io.OutputStream stream,
byte[] data)
Blocks until all data is written to the given stream.
|
static void |
StreamUtils.writeFully(java.io.OutputStream stream,
byte[] data,
int maxChunkSize)
Blocks until all data is written to the given stream.
|
static <TFirst,TSecond,TResult> |
Linq.zip(java.lang.Iterable<TFirst> first,
java.lang.Iterable<TSecond> second,
Functions.Function2<TFirst,TSecond,TResult> function)
Merges two sequences by using the specified predicate function.
|
static <TFirst,TSecond,TResult> |
Linq.zip(TFirst[] first,
TSecond[] second,
Functions.Function2<TFirst,TSecond,TResult> function)
Merges two sequences by using the specified predicate function.
|