Site settings & add sites.
This commit is contained in:
@@ -6,7 +6,7 @@ description = 'Master Password Algorithm Implementation'
|
||||
|
||||
tasks.withType( JavaCompile ) {
|
||||
// Native headers
|
||||
options.compilerArgs += ["-h", new File( new File( project( ':masterpassword-core' ).projectDir, 'src' ), 'java' ).absolutePath]
|
||||
options.compilerArgs += ["-h", new File( new File( project.project( ':masterpassword-core' ).projectDir, 'src' ), 'java' ).absolutePath]
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
@@ -2,6 +2,7 @@ package com.lyndir.masterpassword.util;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -18,6 +19,14 @@ public final class Utilities {
|
||||
return consumer.apply( value );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static <T, R> R ifNotNullElse(@Nullable final T value, final Function<T, R> consumer, @Nonnull final R nullValue) {
|
||||
if (value == null)
|
||||
return nullValue;
|
||||
|
||||
return consumer.apply( value );
|
||||
}
|
||||
|
||||
public static <T> void ifNotNullDo(@Nullable final T value, final Consumer<T> consumer) {
|
||||
if (value != null)
|
||||
consumer.accept( value );
|
||||
|
Reference in New Issue
Block a user