Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmiley committed Jan 11, 2025
1 parent 6c02da2 commit 4aae151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public SimpleOrderedMap<Object> getFacetFieldCounts() throws IOException, Syntax
String[] facetFs = global.getParams(FacetParams.FACET_FIELD);

if (null == facetFs) {
return SimpleOrderedMap.of();
return SimpleOrderedMap.of();
}

// Passing a negative number for FACET_THREADS implies an unlimited number of threads is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
* serialized. It aims to minimize overhead and to be efficient at adding new elements.
*/
public class SimpleOrderedMap<T> extends NamedList<T> {

private static final SimpleOrderedMap<Object> EMPTY = new SimpleOrderedMap<>(List.of());

/** Creates an empty instance */
public SimpleOrderedMap() {
super();
Expand Down Expand Up @@ -72,20 +73,19 @@ public SimpleOrderedMap<T> clone() {

/**
* Returns a shared, empty, and immutable instance of SimpleOrderedMap.
* @return Empty SimpleOrderedMap (immutable)
*
* @return Empty SimpleOrderedMap (immutable)
*/
public static SimpleOrderedMap<Object> of() {
return EMPTY;
}

/**
* Returns an immutable instance of SimpleOrderedMap with a single key-value pair.
*
* @return SimpleOrderedMap containing one key-value pair
*/

public static <T> SimpleOrderedMap<T> of(String name, T val)
{
return new SimpleOrderedMap<>(List.of(name, val));
public static <T> SimpleOrderedMap<T> of(String name, T val) {
return new SimpleOrderedMap<>(List.of(name, val));
}

}

0 comments on commit 4aae151

Please sign in to comment.