Skip to content

Commit

Permalink
leave from methods as Beta
Browse files Browse the repository at this point in the history
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=28374134
  • Loading branch information
kluever committed Mar 14, 2012
1 parent b656eca commit 1678fdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
Expand Down Expand Up @@ -75,6 +76,7 @@ public Map<K, V> loadAll(Iterable<? extends K> keys) throws Exception {
/**
* Returns a {@code CacheLoader} which creates values by applying a {@code Function} to the key.
*/
@Beta
public static <K, V> CacheLoader<K, V> from(Function<K, V> function) {
return new FunctionToCacheLoader<K, V>(function);
}
Expand All @@ -99,6 +101,7 @@ public V load(K key) {
* Returns a {@code CacheLoader} which obtains values from a {@code Supplier} (independent of the
* key).
*/
@Beta
public static <V> CacheLoader<Object, V> from(Supplier<V> supplier) {
return new SupplierToCacheLoader<V>(supplier);
}
Expand Down
3 changes: 3 additions & 0 deletions guava/src/com/google/common/cache/CacheLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Function;
Expand Down Expand Up @@ -100,6 +101,7 @@ public Map<K, V> loadAll(Iterable<? extends K> keys) throws Exception {
/**
* Returns a {@code CacheLoader} which creates values by applying a {@code Function} to the key.
*/
@Beta
public static <K, V> CacheLoader<K, V> from(Function<K, V> function) {
return new FunctionToCacheLoader<K, V>(function);
}
Expand All @@ -124,6 +126,7 @@ public V load(K key) {
* Returns a {@code CacheLoader} which obtains values from a {@code Supplier} (independent of the
* key).
*/
@Beta
public static <V> CacheLoader<Object, V> from(Supplier<V> supplier) {
return new SupplierToCacheLoader<V>(supplier);
}
Expand Down

0 comments on commit 1678fdb

Please sign in to comment.