diff options
Diffstat (limited to 'plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java')
-rw-r--r-- | plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java index a1a2a78a507..0067cef8e73 100644 --- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java +++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/core/util/ProviderCache.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2015 Christian W. Damus and others. - * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -10,7 +10,7 @@ * * Contributors: * Christian W. Damus - Initial API and implementation - * + * *****************************************************************************/ package org.eclipse.papyrus.infra.gmfdiag.assistant.internal.core.util; @@ -26,7 +26,7 @@ import com.google.common.base.Function; /** * A simple weak cache of computed data for some input type. - * + * * @param <I> * the input type, on which the provider computes provided data * @param <T> @@ -40,7 +40,7 @@ public class ProviderCache<I, T> { /** * Initializes me with a function that lazily computes the provided data from the input if I have not already cached it. - * + * * @param cacheFunction * the cache populator function */ @@ -52,7 +52,7 @@ public class ProviderCache<I, T> { /** * Gets the cache for a particular provider operation. - * + * * @param provider * the provider for which to get the cache * @param key @@ -64,7 +64,7 @@ public class ProviderCache<I, T> { public static <I, T> ProviderCache<I, T> getCache(ModelingAssistantProvider provider, Class<? extends IModelingAssistantOperation> key) { ProviderCache<I, T> result = null; - CacheAdapter adapter = CacheAdapter.getCacheAdapter(provider); + CacheAdapter adapter = CacheAdapter.getCacheAdapter(provider); // bug 541590 [CDO] - change is not required here if (adapter != null) { result = (ProviderCache<I, T>) adapter.get(provider, key); } @@ -74,7 +74,7 @@ public class ProviderCache<I, T> { /** * Creates or replaces the cache for a particular provider operation. - * + * * @param provider * the provider for which to create the cache * @param key @@ -84,9 +84,9 @@ public class ProviderCache<I, T> { * @return the new cache (never {@code null}) */ public static <I, T> ProviderCache<I, T> cache(ModelingAssistantProvider provider, Class<? extends IModelingAssistantOperation> key, Function<? super I, ? extends T> cacheFunction) { - ProviderCache<I, T> result = new ProviderCache<I, T>(cacheFunction); + ProviderCache<I, T> result = new ProviderCache<>(cacheFunction); - CacheAdapter adapter = CacheAdapter.getCacheAdapter(provider); + CacheAdapter adapter = CacheAdapter.getCacheAdapter(provider); // bug 541590 [CDO] - change is not required here if (adapter != null) { adapter.put(provider, key, result); } @@ -96,7 +96,7 @@ public class ProviderCache<I, T> { /** * Obtains the cached data for the specified input. - * + * * @param input * an input object * @return the corresponding data |