Skip to content

Commit

Permalink
Use IndexUnicodeProperties in the JSPs (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin authored Jan 30, 2024
1 parent 709e4c4 commit 202077c
Show file tree
Hide file tree
Showing 21 changed files with 643 additions and 584 deletions.
288 changes: 0 additions & 288 deletions UnicodeJsps/src/main/java/org/unicode/jsp/CachedProps.java

This file was deleted.

7 changes: 4 additions & 3 deletions UnicodeJsps/src/main/java/org/unicode/jsp/ScriptTester2.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.TreeSet;
import org.unicode.props.IndexUnicodeProperties;

public class ScriptTester2 {
private final UnicodeMap<UnicodeSet> toEquivalents;
Expand All @@ -48,7 +49,7 @@ private ScriptTester2(

public static ScriptTester2 getInstance(VersionInfo version, UnicodeSet allowed) {
allowed = allowed.isFrozen() ? allowed : new UnicodeSet(allowed).freeze();
CachedProps props = CachedProps.getInstance(version);
var props = IndexUnicodeProperties.make(version);
// System.out.println(new TreeSet(props.getAvailable()));
UnicodeMap<String> confusables = props.getProperty("Confusable_MA").getUnicodeMap();
UnicodeMap<UnicodeSet> equiv = new UnicodeMap();
Expand Down Expand Up @@ -114,12 +115,12 @@ public static ScriptTester2 getInstance(VersionInfo version, UnicodeSet allowed)
}

public static UnicodeSet getAllowedStatus(VersionInfo version) {
CachedProps props = CachedProps.getInstance(version);
var props = IndexUnicodeProperties.make(version);
return props.getProperty("Identifier_Status").getUnicodeMap().getSet("Allowed").freeze();
}

public static UnicodeSet getNFKD_Quick_CheckNo(VersionInfo version) {
CachedProps props = CachedProps.getInstance(version);
var props = IndexUnicodeProperties.make(version);
return props.getProperty("NFKD_Quick_Check").getUnicodeMap().getSet("No").freeze();
}

Expand Down
Loading

0 comments on commit 202077c

Please sign in to comment.