Merge pull request #382 from jentfoo/master

Some small classpath tweaks to be compatible with openJDK's api
This commit is contained in:
Joel Dice 2014-12-15 17:34:15 -07:00
commit 4d9c649676
4 changed files with 35 additions and 1 deletions

View File

@ -49,6 +49,14 @@ public class ConcurrentHashMap<K,V>
this();
}
public ConcurrentHashMap(int initialCapacity, float loadFactor) {
this();
}
public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) {
this();
}
public boolean isEmpty() {
return content.size == 0;
}

View File

@ -10,6 +10,6 @@
package java.util.concurrent;
public interface Delayed {
public interface Delayed extends Comparable<Delayed> {
public long getDelay(TimeUnit unit);
}

View File

@ -14,6 +14,8 @@ import java.util.Collection;
public interface ExecutorService extends Executor {
public void shutdown();
public List<Runnable> shutdownNow();
public boolean isShutdown();

View File

@ -0,0 +1,24 @@
/* Copyright (c) 2008-2014, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See license.txt for
details. */
package java.util.concurrent;
public class Executors {
public static <T> Callable<T> callable(final Runnable task, final T result) {
return new Callable<T>() {
@Override
public T call() throws Exception {
task.run();
return result;
}
};
}
}