Skip to content

Commit 1988f8c

Browse files
committed
Polish Javadoc for ContextCache
1 parent 9ff8a01 commit 1988f8c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

spring-test/src/main/java/org/springframework/test/context/ContextCache.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,25 @@ class ContextCache {
6969

7070

7171
/**
72-
* Clear all contexts from the cache and clears context hierarchy information as well.
72+
* Clear all contexts from the cache and clear context hierarchy information as well.
7373
*/
7474
public void clear() {
7575
this.contextMap.clear();
7676
this.hierarchyMap.clear();
7777
}
7878

7979
/**
80-
* Clear hit and miss count statistics for the cache (i.e., resets counters to zero).
80+
* Clear hit and miss count statistics for the cache (i.e., reset counters to zero).
8181
*/
8282
public void clearStatistics() {
8383
this.hitCount.set(0);
8484
this.missCount.set(0);
8585
}
8686

8787
/**
88-
* Return whether there is a cached context for the given key.
88+
* Determine whether there is a cached context for the given key.
8989
* @param key the context key (never {@code null})
90+
* @return {@code true} if the cache contains a context with the given key
9091
*/
9192
public boolean contains(MergedContextConfiguration key) {
9293
Assert.notNull(key, "Key must not be null");
@@ -223,9 +224,9 @@ private void remove(List<MergedContextConfiguration> removedContexts, MergedCont
223224
}
224225

225226
/**
226-
* Determine the number of contexts currently stored in the cache. If the cache
227-
* contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
228-
* <tt>Integer.MAX_VALUE</tt>.
227+
* Determine the number of contexts currently stored in the cache.
228+
* <p>If the cache contains more than {@code Integer.MAX_VALUE} elements,
229+
* this method returns {@code Integer.MAX_VALUE}.
229230
*/
230231
public int size() {
231232
return this.contextMap.size();
@@ -239,7 +240,7 @@ public int getParentContextCount() {
239240
}
240241

241242
/**
242-
* Generates a text string, which contains the {@linkplain #size() size} as well
243+
* Generate a text string, which contains the {@linkplain #size} as well
243244
* as the {@linkplain #getHitCount() hit}, {@linkplain #getMissCount() miss},
244245
* and {@linkplain #getParentContextCount() parent context} counts.
245246
*/

0 commit comments

Comments
 (0)