Skip navigation links
A B C D E F G H I L M N O P R S T U V W 

A

accept(Throwable) - Method in class com.diffplug.common.base.Errors.Plugins.OnErrorThrowAssertion
 
accept(T) - Method in interface com.diffplug.common.base.Throwing.Specific.Consumer
 
alwaysFalse() - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that always evaluates to false.
alwaysTrue() - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that always evaluates to true.
and(Iterable<? extends Predicate<? super T>>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if each of its components evaluates to true.
and(Predicate<? super T>...) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if each of its components evaluates to true.
and(Predicate<? super T>, Predicate<? super T>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if both of its components evaluate to true.
apply(T) - Method in interface com.diffplug.common.base.Throwing.Specific.Function
 
asRuntime(Throwable) - Static method in class com.diffplug.common.base.Errors
Converts the given exception to a RuntimeException, with a minimum of new exceptions to obscure the cause.
assignableFrom(Class<?>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the class being tested is assignable from the given class.

B

Box<T> - Class in com.diffplug.common.base
Simple class for creating boxed variables.
Box(T) - Constructor for class com.diffplug.common.base.Box
 
Box.NonNull<T> - Class in com.diffplug.common.base
A Box which guarantees to never be null (by disallowing null values in its setter).
breadthFirst(TreeDef<T>, T) - Static method in class com.diffplug.common.base.TreeIterable
Returns a breadth-first search of the given tree, not including root.
breadthFirst(TreeDef<T>, T) - Static method in class com.diffplug.common.base.TreeStream
Creates a Stream doing a breadth-first iteration.
buildString(Consumer<StringPrinter>) - Static method in class com.diffplug.common.base.StringPrinter
Easy way to create a String using a StringPrinter.
buildStringFromLines(String...) - Static method in class com.diffplug.common.base.StringPrinter
Easy way to create a String from a bunch of lines.
byteException(byte) - Static method in exception com.diffplug.common.base.Unhandled
 

C

captureStackBelow(Class<?>...) - Static method in class com.diffplug.common.base.StackDumper
Captures all of the current stack which is below the given classes.
charException(char) - Static method in exception com.diffplug.common.base.Unhandled
 
childrenOf(T) - Method in interface com.diffplug.common.base.TreeDef
Returns all the children of the given node.
classException(Object) - Static method in exception com.diffplug.common.base.Unhandled
 
com.diffplug.common.base - package com.diffplug.common.base
 
compare(T, T) - Static method in enum com.diffplug.common.base.Comparison
Returns a Comparison result from the two given comparables.
Comparison - Enum in com.diffplug.common.base
Utility class to make reading the result of "compareTo" results a little easier.
compose(Function<B, C>, Function<A, ? extends B>) - Static method in class com.diffplug.common.base.Functions
Returns the composition of two functions.
compose(Predicate<B>, Function<A, ? extends B>) - Static method in class com.diffplug.common.base.Predicates
Returns the composition of a function and a predicate.
compose(Function<? super F, T>, Supplier<F>) - Static method in class com.diffplug.common.base.Suppliers
Returns a new supplier which is the composition of the provided function and supplier.
constant(E) - Static method in class com.diffplug.common.base.Functions
Creates a function that returns value for any input.
Consumers - Class in com.diffplug.common.base
Utilities for creating consumers.
Consumers() - Constructor for class com.diffplug.common.base.Consumers
 
contains(Pattern) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the CharSequence being tested contains any match for the given regular expression pattern.
containsPattern(String) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the CharSequence being tested contains any match for the given regular expression pattern.
copy(T, TreeDef<T>) - Static method in class com.diffplug.common.base.TreeNode
Creates a hierarchy of TreeNodes that copies the structure and content of the given Tree.
createHandling(Consumer<Throwable>) - Static method in class com.diffplug.common.base.Errors
Creates an Errors.Handling which passes any exceptions it receives to the given handler.
createRethrowing(Function<Throwable, RuntimeException>) - Static method in class com.diffplug.common.base.Errors
Creates an Errors.Rethrowing which transforms any exceptions it receives into a RuntimeException as specified by the given function, and then throws that RuntimeException.

D

defaultDialog(Throwable) - Static method in interface com.diffplug.common.base.Errors.Plugins
Default behavior of Errors.dialog() is JOptionPane.showMessageDialog without a parent.
defaultLog(Throwable) - Static method in interface com.diffplug.common.base.Errors.Plugins
Default behavior of Errors.log() is Throwable.printStackTrace().
depthFirst(TreeDef<T>, T) - Static method in class com.diffplug.common.base.TreeIterable
Returns a breadth-first traversal of the given tree, not including root.
depthFirst(TreeDef<T>, T) - Static method in class com.diffplug.common.base.TreeStream
Creates a Stream doing a depth-first iteration.
dialog() - Static method in class com.diffplug.common.base.Errors
Opens a dialog to notify the user of any exceptions.
doNothing() - Static method in class com.diffplug.common.base.Consumers
A consumer which does nothing.
doubleException(double) - Static method in exception com.diffplug.common.base.Unhandled
 
dump(String, List<StackTraceElement>) - Static method in class com.diffplug.common.base.StackDumper
Dumps the given message and stack to the system error console.
dump(String, StackTraceElement[]) - Static method in class com.diffplug.common.base.StackDumper
Dumps the given message and stack to the system error console.
dump(String, Throwable) - Static method in class com.diffplug.common.base.StackDumper
Dumps the given message and exception stack to the system error console
dump(String) - Static method in class com.diffplug.common.base.StackDumper
Dumps the given stack to the system error console.
dumpWhenSysErrContains(String) - Static method in class com.diffplug.common.base.StackDumper
Dumps a stack trace anytime trigger string is printed to System.err.
dumpWhenSysOutContains(String) - Static method in class com.diffplug.common.base.StackDumper
Dumps a stack trace anytime the trigger string is printed to System.out.
DurianPlugins - Class in com.diffplug.common.base
A registry for plugin implementations which obeys the following contract: Once someone has requested a class from DurianPlugins, whatever instance was returned will continue to be returned for every future call.

E

empty() - Static method in class com.diffplug.common.base.Box
Creates an empty Holder object.
enumException(Enum<?>) - Static method in exception com.diffplug.common.base.Unhandled
 
equalTo(T) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the object being tested equals() the given target or both are null.
Errors - Class in com.diffplug.common.base
Errors makes it easy to create implementations of the standard functional interfaces (which don't allow checked exceptions).
Errors(Consumer<Throwable>) - Constructor for class com.diffplug.common.base.Errors
 
Errors.Handling - Class in com.diffplug.common.base
An Errors which is free to rethrow the exception, but it might not.
Errors.Plugins - Interface in com.diffplug.common.base
Namespace for the plugins which Errors supports.
Errors.Plugins.Dialog - Interface in com.diffplug.common.base
Errors.dialog().
Errors.Plugins.Log - Interface in com.diffplug.common.base
Errors.log().
Errors.Plugins.OnErrorThrowAssertion - Class in com.diffplug.common.base
An implementation of all of the Errors built-ins which throws an AssertionError on any exception.
Errors.Rethrowing - Class in com.diffplug.common.base
An Errors which is guaranteed to always throw a RuntimeException.

F

filter(Predicate<T>) - Method in interface com.diffplug.common.base.TreeDef
Returns a new TreeDef which whose childrenOf() method is filtered by the given predicate.
filter(Predicate<T>) - Method in interface com.diffplug.common.base.TreeDef.Parented
Returns a new TreeDef which whose childrenOf() and parentOf() methods are filtered by the given predicate.
filteredList(List<T>, Predicate<T>) - Static method in interface com.diffplug.common.base.TreeDef
Returns a filtered version of the given list.
floatException(float) - Static method in exception com.diffplug.common.base.Unhandled
 
forMap(Map<K, V>) - Static method in class com.diffplug.common.base.Functions
Returns a function which performs a map lookup.
forMap(Map<K, ? extends V>, V) - Static method in class com.diffplug.common.base.Functions
Returns a function which performs a map lookup with a default value.
forPredicate(Predicate<T>) - Static method in class com.diffplug.common.base.Functions
Creates a function that returns the same boolean output as the given predicate for all inputs.
forSupplier(Supplier<T>) - Static method in class com.diffplug.common.base.Functions
Returns a function that always returns the result of invoking Supplier.get() on supplier, regardless of its input.
from(int) - Static method in enum com.diffplug.common.base.Comparison
Returns a Comparison from the given result of Comparable.compareTo().
from(DoubleSupplier, DoubleConsumer) - Static method in interface com.diffplug.common.base.GetterSetter.Double
Creates a GetterSetter.Double from a Supplier and a Consumer.
from(Supplier<T>, Consumer<T>) - Static method in interface com.diffplug.common.base.GetterSetter
Creates a GetterSetter from a Supplier and a Consumer.
from(V, Function<V, T>, BiConsumer<V, T>) - Static method in interface com.diffplug.common.base.GetterSetter
Creates a GetterSetter from an argument and two functions which operate on that argument.
from(IntSupplier, IntConsumer) - Static method in interface com.diffplug.common.base.GetterSetter.Int
Creates a GetterSetter.Int from a Supplier and a Consumer.
Functions - Class in com.diffplug.common.base
The APIs below are identical to Google's Guava 18.0, except that guava's functional interfaces have been swapped with Java 8's.

G

get() - Method in class com.diffplug.common.base.Box
 
get(Class<T>, T) - Static method in class com.diffplug.common.base.DurianPlugins
Returns an instance of pluginClass which is guaranteed to be identical throughout the runtime existence of this library.
get(Throwing.Supplier<T>) - Method in class com.diffplug.common.base.Errors.Rethrowing
Attempts to call the given supplier, throws some kind of RuntimeException on failure.
get() - Method in interface com.diffplug.common.base.Throwing.Specific.Supplier
 
getChildren() - Method in class com.diffplug.common.base.TreeNode
 
getObj() - Method in class com.diffplug.common.base.TreeNode
 
getParent() - Method in class com.diffplug.common.base.TreeNode
 
GetterSetter<T> - Interface in com.diffplug.common.base
Provides get/set access to some field.
GetterSetter.Double - Interface in com.diffplug.common.base
A GetterSetter for primitive doubles.
GetterSetter.Int - Interface in com.diffplug.common.base
A GetterSetter for primitive ints.
getWithDefault(Throwing.Supplier<T>, T) - Method in class com.diffplug.common.base.Errors.Handling
Attempts to call the given supplier, returns onFailure if there is a failure.

H

handle(Throwable) - Method in class com.diffplug.common.base.Errors
Passes the given error to be handled by the Errors.
handler - Variable in class com.diffplug.common.base.Errors
 
Handling(Consumer<Throwable>) - Constructor for class com.diffplug.common.base.Errors.Handling
 

I

identity() - Static method in class com.diffplug.common.base.Functions
Returns the identity function.
in(Collection<? extends T>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the object reference being tested is a member of the given collection.
instanceOf(Class<?>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the object being tested is an instance of the given class.
integerException(int) - Static method in exception com.diffplug.common.base.Unhandled
 
isNull() - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the object reference being tested is null.

L

lesserEqualGreater(T, T, T) - Method in enum com.diffplug.common.base.Comparison
Returns the appropriate T based on the Comparison value.
log() - Static method in class com.diffplug.common.base.Errors
Logs any exceptions.
lowestCommonAncestor(TreeDef.Parented<T>, T, T) - Static method in class com.diffplug.common.base.TreeQuery
Returns the common parent of the two given elements.
lowestCommonAncestorN(TreeDef.Parented<T>, T...) - Static method in class com.diffplug.common.base.TreeQuery
Returns the common parent of N elements.

M

memoize(Supplier<T>) - Static method in class com.diffplug.common.base.Suppliers
Returns a supplier which caches the instance retrieved during the first call to get() and returns that value on subsequent calls to get().
memoizeWithExpiration(Supplier<T>, long, TimeUnit) - Static method in class com.diffplug.common.base.Suppliers
Returns a supplier that caches the instance supplied by the delegate and removes the cached value after the specified time has passed.
MoreCollectors - Class in com.diffplug.common.base
Some useful collectors which aren't included as Java 8 built-ins.
MoreCollectors() - Constructor for class com.diffplug.common.base.MoreCollectors
 

N

NonNull(T) - Constructor for class com.diffplug.common.base.Box.NonNull
 
not(Predicate<T>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the given predicate evaluates to false.
notNull() - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if the object reference being tested is not null.

O

objectException(Object) - Static method in exception com.diffplug.common.base.Unhandled
 
of(T) - Static method in class com.diffplug.common.base.Box.NonNull
 
of(T) - Static method in class com.diffplug.common.base.Box
Creates a Holder of the given object.
of(Function<T, List<T>>) - Static method in interface com.diffplug.common.base.TreeDef
Creates a TreeDef which is implemented by the given function.
of(Function<T, List<T>>, Function<T, T>) - Static method in interface com.diffplug.common.base.TreeDef.Parented
Creates a TreeDef.Parented which is implemented by the given two functions.
ofInstance(T) - Static method in class com.diffplug.common.base.Suppliers
Returns a supplier that always supplies instance.
OnErrorThrowAssertion() - Constructor for class com.diffplug.common.base.Errors.Plugins.OnErrorThrowAssertion
 
operationException() - Static method in exception com.diffplug.common.base.Unhandled
 
or(Iterable<? extends Predicate<? super T>>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if any one of its components evaluates to true.
or(Predicate<? super T>...) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if any one of its components evaluates to true.
or(Predicate<? super T>, Predicate<? super T>) - Static method in class com.diffplug.common.base.Predicates
Returns a predicate that evaluates to true if either of its components evaluates to true.

P

parentOf(T) - Method in interface com.diffplug.common.base.TreeDef.Parented
Returns the parent of the given node.
Predicates - Class in com.diffplug.common.base
The APIs below are identical to Google's Guava 18.0, except that guava's functional interfaces have been swapped with Java 8's.
print(String) - Method in class com.diffplug.common.base.StringPrinter
Prints the string.
println(String) - Method in class com.diffplug.common.base.StringPrinter
Prints the string and a newline (always '\n').

R

redirectable(Supplier<Consumer<T>>) - Static method in class com.diffplug.common.base.Consumers
A Consumer which always passes its input to the given target.
register(Class<T>, T) - Static method in class com.diffplug.common.base.DurianPlugins
Registers an implementation as a global override of any injected or default implementations.
rethrow() - Static method in class com.diffplug.common.base.Errors
Rethrows any exceptions as runtime exceptions.
Rethrowing(Function<Throwable, RuntimeException>) - Constructor for class com.diffplug.common.base.Errors.Rethrowing
 
run(Throwing.Runnable) - Method in class com.diffplug.common.base.Errors
Attempts to run the given runnable.
run() - Method in interface com.diffplug.common.base.Throwing.Specific.Runnable
 

S

set(T) - Method in class com.diffplug.common.base.Box.NonNull
 
set(T) - Method in class com.diffplug.common.base.Box
 
set(double) - Method in interface com.diffplug.common.base.GetterSetter.Double
Sets the value which will later be returned by get().
set(int) - Method in interface com.diffplug.common.base.GetterSetter.Int
Sets the value which will later be returned by get().
set(T) - Method in interface com.diffplug.common.base.GetterSetter
Sets the value which will later be returned by get().
shortException(short) - Static method in exception com.diffplug.common.base.Unhandled
 
singleOrEmpty() - Static method in class com.diffplug.common.base.MoreCollectors
Collector which traverses a stream and returns either a single element (if there was only one element) or empty (if there were 0 or more than 1 elements).
singleOrEmptyShortCircuiting(Stream<T>) - Static method in class com.diffplug.common.base.MoreCollectors
Same behavior as MoreCollectors.singleOrEmpty(), except that it returns early if it is possible to do so.
StackDumper - Class in com.diffplug.common.base
Utility methods for dumping the stack - arbitrarily or at specific trigger points (such as when a certain string prints to console).
StackDumper() - Constructor for class com.diffplug.common.base.StackDumper
 
stringException(String) - Static method in exception com.diffplug.common.base.Unhandled
 
StringPrinter - Class in com.diffplug.common.base
A simple class for receiving a stream of Strings in a way that resembles a PrintStream or PrintWriter.
StringPrinter(Consumer<String>) - Constructor for class com.diffplug.common.base.StringPrinter
StringPrinter will pass all the strings it receives to the given consumer.
stringsToLines(Consumer<String>) - Static method in class com.diffplug.common.base.StringPrinter
Given a consumer of lines, creates a stateful consumer of strings which will combine its input until it finds a newline, and split its input when it contains multiple newlines.
supplierFunction() - Static method in class com.diffplug.common.base.Suppliers
Returns a function that accepts a supplier and returns the result of invoking Supplier.get() on that supplier.
Suppliers - Class in com.diffplug.common.base
The APIs below are identical to Google's Guava 18.0, except that guava's functional interfaces have been swapped with Java 8's.
suppress() - Static method in class com.diffplug.common.base.Errors
Suppresses errors entirely.
synchronizedSupplier(Supplier<T>) - Static method in class com.diffplug.common.base.Suppliers
Returns a supplier whose get() method synchronizes on delegate before calling it, making it thread-safe.

T

test(T) - Method in interface com.diffplug.common.base.Throwing.Specific.Predicate
 
Throwing - Interface in com.diffplug.common.base
Versions of the standard functional interfaces which throw Throwable.
Throwing.Consumer<T> - Interface in com.diffplug.common.base
 
Throwing.Function<T,R> - Interface in com.diffplug.common.base
 
Throwing.Predicate<T> - Interface in com.diffplug.common.base
 
Throwing.Runnable - Interface in com.diffplug.common.base
 
Throwing.Specific - Interface in com.diffplug.common.base
Versions of the standard functional interfaces which throw a specific exception type.
Throwing.Specific.Consumer<T,E extends java.lang.Throwable> - Interface in com.diffplug.common.base
 
Throwing.Specific.Function<T,R,E extends java.lang.Throwable> - Interface in com.diffplug.common.base
 
Throwing.Specific.Predicate<T,E extends java.lang.Throwable> - Interface in com.diffplug.common.base
 
Throwing.Specific.Runnable<E extends java.lang.Throwable> - Interface in com.diffplug.common.base
 
Throwing.Specific.Supplier<T,E extends java.lang.Throwable> - Interface in com.diffplug.common.base
 
Throwing.Supplier<T> - Interface in com.diffplug.common.base
 
toOutputStream(Charset) - Method in class com.diffplug.common.base.StringPrinter
Creates an OutputStream which will print its content to the given StringPrinter, encoding bytes according to the given Charset.
toParent(TreeDef.Parented<T>, T) - Static method in class com.diffplug.common.base.TreeIterable
Returns a breadth-first traversal of the given tree, including the current node.
toParent(TreeDef.Parented<T>, T, T) - Static method in class com.diffplug.common.base.TreeQuery
Returns a mutable list whose first element is the child, and last element is the root.
toParent(TreeDef.Parented<T>, T) - Static method in class com.diffplug.common.base.TreeStream
Creates a Stream towards the parent.
toPrintStream() - Method in class com.diffplug.common.base.StringPrinter
Creates a UTF-8 PrintStream which passes its content to this StringPrinter.
toPrintStream(Charset) - Method in class com.diffplug.common.base.StringPrinter
Creates a PrintStream of the given charset, which passes its content to this StringPrinter.
toPrintWriter() - Method in class com.diffplug.common.base.StringPrinter
Creates a PrintWriter which passes its content to this StringPrinter.
toRoot(TreeDef.Parented<T>, T) - Static method in class com.diffplug.common.base.TreeQuery
Returns a mutable list whose first element is the child, and last element is the root.
toString() - Method in class com.diffplug.common.base.Box
 
toWriter() - Method in class com.diffplug.common.base.StringPrinter
Creates a Writer which passes its content to this StringPrinter.
TreeDef<T> - Interface in com.diffplug.common.base
Function which defines a Tree structure based on a root object.
treeDef() - Static method in class com.diffplug.common.base.TreeNode
TreeDef for the generic TreeNode class.
TreeDef.Parented<T> - Interface in com.diffplug.common.base
A "doubly-linked" tree, where nodes know about both their parent and their children.
TreeIterable - Class in com.diffplug.common.base
An immutable tree.
TreeNode<T> - Class in com.diffplug.common.base
Allows Trees to be manually defined across any object.
TreeNode(TreeNode<T>, T) - Constructor for class com.diffplug.common.base.TreeNode
 
TreeQuery - Class in com.diffplug.common.base
 
TreeQuery() - Constructor for class com.diffplug.common.base.TreeQuery
 
TreeStream - Class in com.diffplug.common.base
Methods which create a Stream which walks a tree structure.

U

Unhandled - Exception in com.diffplug.common.base
These exceptions are designed for checking programming errors (e.g.
Unhandled(String) - Constructor for exception com.diffplug.common.base.Unhandled
 

V

valueOf(String) - Static method in enum com.diffplug.common.base.Comparison
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.diffplug.common.base.Comparison
Returns an array containing the constants of this enum type, in the order they are declared.

W

wrap(Throwing.Supplier<T>) - Method in class com.diffplug.common.base.Errors.Rethrowing
Attempts to call the given supplier, throws some kind of RuntimeException on failure.
wrap(Throwing.Function<T, R>) - Method in class com.diffplug.common.base.Errors.Rethrowing
Attempts to call the given function, throws some kind of RuntimeException on failure.
wrap(Throwing.Predicate<T>) - Method in class com.diffplug.common.base.Errors.Rethrowing
Attempts to call the given function, throws some kind of RuntimeException on failure.
wrap(Throwing.Runnable) - Method in class com.diffplug.common.base.Errors
Returns a Runnable whose exceptions are handled by this Errors.
wrap(Throwing.Consumer<T>) - Method in class com.diffplug.common.base.Errors
Returns a Consumer whose exceptions are handled by this Errors.
wrapAndDumpWhenContains(PrintStream, String) - Static method in class com.diffplug.common.base.StackDumper
Returns a PrintStream which will redirect all of its output to the source PrintStream.
wrapWithDefault(Throwing.Supplier<T>, T) - Method in class com.diffplug.common.base.Errors.Handling
Attempts to call the given supplier, and returns the given value on failure.
wrapWithDefault(Throwing.Function<T, R>, R) - Method in class com.diffplug.common.base.Errors.Handling
Attempts to call the given function, and returns the given value on failure.
wrapWithDefault(Throwing.Predicate<T>, boolean) - Method in class com.diffplug.common.base.Errors.Handling
Attempts to call the given function, and returns the given value on failure.
A B C D E F G H I L M N O P R S T U V W 
Skip navigation links