style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -43,7 +43,8 @@ public class LFUCache<K, V> {
* This method returns value present in the cache corresponding to the key passed as parameter
*
* @param <K> key for which value is to be retrieved
* @returns <V> object corresponding to the key passed as parameter, returns null if <K> key is not present in the cache
* @returns <V> object corresponding to the key passed as parameter, returns null if <K> key is
* not present in the cache
*/
public V get(K key) {
if (this.map.get(key) == null) {

View File

@ -126,14 +126,10 @@ public class LRUCache<K, V> {
private I key;
private J value;
public Entry() {}
public Entry() {
}
public Entry(
Entry<I, J> preEntry,
Entry<I, J> nextEntry,
I key,
J value
) {
public Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
this.preEntry = preEntry;
this.nextEntry = nextEntry;
this.key = key;

View File

@ -124,14 +124,10 @@ public class MRUCache<K, V> {
private I key;
private J value;
public Entry() {}
public Entry() {
}
public Entry(
Entry<I, J> preEntry,
Entry<I, J> nextEntry,
I key,
J value
) {
public Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
this.preEntry = preEntry;
this.nextEntry = nextEntry;
this.key = key;