diff --git a/utility-swing/src/main/java/com/dua3/utility/swing/StyledDocumentConverter.java b/utility-swing/src/main/java/com/dua3/utility/swing/StyledDocumentConverter.java index 0529ac8e..b71d502e 100644 --- a/utility-swing/src/main/java/com/dua3/utility/swing/StyledDocumentConverter.java +++ b/utility-swing/src/main/java/com/dua3/utility/swing/StyledDocumentConverter.java @@ -91,7 +91,7 @@ public static StyledDocumentConversionOption addStyledAttributes(Map> attributes) { + public static StyledDocumentConversionOption addStyledAttributes(Iterable> attributes) { return new StyledDocumentConversionOption(c -> attributes.forEach(p -> c.defaultStyledAttributes.addAttribute(p.getKey(), p.getValue()))); } diff --git a/utility/src/main/java/com/dua3/utility/lang/LangUtil.java b/utility/src/main/java/com/dua3/utility/lang/LangUtil.java index a66049f0..d386eda5 100644 --- a/utility/src/main/java/com/dua3/utility/lang/LangUtil.java +++ b/utility/src/main/java/com/dua3/utility/lang/LangUtil.java @@ -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; @@ -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; diff --git a/utility/src/main/java/com/dua3/utility/text/TextUtil.java b/utility/src/main/java/com/dua3/utility/text/TextUtil.java index 8942691e..c7a31efc 100644 --- a/utility/src/main/java/com/dua3/utility/text/TextUtil.java +++ b/utility/src/main/java/com/dua3/utility/text/TextUtil.java @@ -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; @@ -206,7 +205,7 @@ public static String transform(String template, Map.Entry... 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> substitutions) { + public static String transform(String template, Iterable> substitutions) { UnaryOperator env = s -> { for (Map .Entry r : substitutions) { if (Objects.equals(s, r.getKey())) {