mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-15 18:23:54 +00:00
fix: typos in documentation files (#3186)
* Update CannotSubtractException.java * Update CachingTest.java * Update App.java * Update caching.urm.puml * Update update-method.urm.puml
This commit is contained in:
@@ -13,7 +13,7 @@ package com.iluwatar.caching {
|
|||||||
- LOGGER : Logger {static}
|
- LOGGER : Logger {static}
|
||||||
+ App()
|
+ App()
|
||||||
+ main(args : String[]) {static}
|
+ main(args : String[]) {static}
|
||||||
+ useCacheAsideStategy()
|
+ useCacheAsideStrategy()
|
||||||
+ useReadAndWriteThroughStrategy()
|
+ useReadAndWriteThroughStrategy()
|
||||||
+ useReadThroughAndWriteAroundStrategy()
|
+ useReadThroughAndWriteAroundStrategy()
|
||||||
+ useReadThroughAndWriteBehindStrategy()
|
+ useReadThroughAndWriteBehindStrategy()
|
||||||
@@ -116,4 +116,4 @@ Node --> "-previous" Node
|
|||||||
AppManager --> "-cachingPolicy" CachingPolicy
|
AppManager --> "-cachingPolicy" CachingPolicy
|
||||||
Node --> "-userAccount" UserAccount
|
Node --> "-userAccount" UserAccount
|
||||||
CacheStore --> "-cache" LruCache
|
CacheStore --> "-cache" LruCache
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class App {
|
|||||||
LOGGER.info(splitLine);
|
LOGGER.info(splitLine);
|
||||||
app.useReadThroughAndWriteBehindStrategy();
|
app.useReadThroughAndWriteBehindStrategy();
|
||||||
LOGGER.info(splitLine);
|
LOGGER.info(splitLine);
|
||||||
app.useCacheAsideStategy();
|
app.useCacheAsideStrategy();
|
||||||
LOGGER.info(splitLine);
|
LOGGER.info(splitLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ public class App {
|
|||||||
/**
|
/**
|
||||||
* Cache-Aside.
|
* Cache-Aside.
|
||||||
*/
|
*/
|
||||||
public void useCacheAsideStategy() {
|
public void useCacheAsideStrategy() {
|
||||||
LOGGER.info("# CachingPolicy.ASIDE");
|
LOGGER.info("# CachingPolicy.ASIDE");
|
||||||
appManager.initCachingPolicy(CachingPolicy.ASIDE);
|
appManager.initCachingPolicy(CachingPolicy.ASIDE);
|
||||||
LOGGER.info(appManager.printCacheContent());
|
LOGGER.info(appManager.printCacheContent());
|
||||||
|
|||||||
@@ -68,6 +68,6 @@ class CachingTest {
|
|||||||
@Test
|
@Test
|
||||||
void testCacheAsideStrategy() {
|
void testCacheAsideStrategy() {
|
||||||
assertNotNull(app);
|
assertNotNull(app);
|
||||||
app.useCacheAsideStategy();
|
app.useCacheAsideStrategy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.iluwatar;
|
package com.iluwatar;
|
||||||
/**
|
/**
|
||||||
* An exception for when the user tries to subtract two diffrent currencies or subtract an amount he doesn't have.
|
* An exception for when the user tries to subtract two different currencies or subtract an amount he doesn't have.
|
||||||
*/
|
*/
|
||||||
public class CannotSubtractException extends Exception {
|
public class CannotSubtractException extends Exception {
|
||||||
/**
|
/**
|
||||||
@@ -12,4 +12,4 @@ public class CannotSubtractException extends Exception {
|
|||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ package com.iluwatar.updatemethod {
|
|||||||
- PATROLLING_RIGHT_BOUNDING : int {static}
|
- PATROLLING_RIGHT_BOUNDING : int {static}
|
||||||
# patrollingLeft : boolean
|
# patrollingLeft : boolean
|
||||||
+ Skeleton(id : int)
|
+ Skeleton(id : int)
|
||||||
+ Skeleton(id : int, postition : int)
|
+ Skeleton(id : int, position : int)
|
||||||
+ update()
|
+ update()
|
||||||
}
|
}
|
||||||
class Statue {
|
class Statue {
|
||||||
@@ -48,4 +48,4 @@ package com.iluwatar.updatemethod {
|
|||||||
World --> "-entities" Entity
|
World --> "-entities" Entity
|
||||||
Skeleton --|> Entity
|
Skeleton --|> Entity
|
||||||
Statue --|> Entity
|
Statue --|> Entity
|
||||||
@enduml
|
@enduml
|
||||||
|
|||||||
Reference in New Issue
Block a user