Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Dec 13, 2023
1 parent 25be774 commit d42584d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static StyledDocumentConversionOption addStyledAttributes(Map<Object, Obj
* @param attributes attributes for new StyledDocuments
* @return the option to use
*/
public static StyledDocumentConversionOption addStyledAttributes(Iterable<Map.Entry<Object, Object>> attributes) {
public static StyledDocumentConversionOption addStyledAttributes(Iterable<? extends Map.Entry<Object, Object>> attributes) {
return new StyledDocumentConversionOption(c -> attributes.forEach(p -> c.defaultStyledAttributes.addAttribute(p.getKey(), p.getValue())));
}

Expand Down
3 changes: 0 additions & 3 deletions utility/src/main/java/com/dua3/utility/lang/LangUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package com.dua3.utility.lang;

import com.dua3.cabe.annotations.Nullable;
import com.dua3.utility.data.Pair;
import com.dua3.utility.io.IoUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -28,9 +27,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
Expand Down
3 changes: 1 addition & 2 deletions utility/src/main/java/com/dua3/utility/text/TextUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.dua3.utility.text;

import com.dua3.utility.data.Pair;
import com.dua3.utility.lang.LangUtil;
import com.dua3.utility.math.geometry.Dimension2f;
import org.apache.logging.log4j.LogManager;
Expand Down Expand Up @@ -206,7 +205,7 @@ public static String transform(String template, Map.Entry<String, String>... sub
* @param substitutions the key-value pairs used for substitution
* @return the transformed string with placeholders replaced by corresponding values
*/
public static String transform(String template, Iterable<Map.Entry<String, String>> substitutions) {
public static String transform(String template, Iterable<? extends Map.Entry<String, String>> substitutions) {
UnaryOperator<String> env = s -> {
for (Map .Entry<String, String> r : substitutions) {
if (Objects.equals(s, r.getKey())) {
Expand Down

0 comments on commit d42584d

Please sign in to comment.