-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Text folding to UnorderedMultiValueKey
- Loading branch information
Showing
9 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
std-bits/table/src/main/java/org/enso/table/aggregations/CountDistinct.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
std-bits/table/src/main/java/org/enso/table/text/CaseInsensitiveFold.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.enso.table.text; | ||
|
||
import org.enso.base.Text_Utils; | ||
|
||
import java.util.Locale; | ||
|
||
public class CaseInsensitiveFold implements TextFoldingStrategy { | ||
|
||
private final Locale locale; | ||
|
||
public CaseInsensitiveFold(Locale locale) { | ||
this.locale = locale; | ||
} | ||
|
||
@Override | ||
public String fold(String value) { | ||
return Text_Utils.case_insensitive_key(value, locale); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
std-bits/table/src/main/java/org/enso/table/text/TextFoldingStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.enso.table.text; | ||
|
||
public interface TextFoldingStrategy { | ||
String fold(String value); | ||
} |
13 changes: 13 additions & 0 deletions
13
std-bits/table/src/main/java/org/enso/table/text/UnicodeNormalizedFold.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.enso.table.text; | ||
|
||
import org.enso.base.Text_Utils; | ||
|
||
public class UnicodeNormalizedFold implements TextFoldingStrategy { | ||
@Override | ||
public String fold(String value) { | ||
return Text_Utils.normalize(value); | ||
} | ||
|
||
public static final UnicodeNormalizedFold INSTANCE = new UnicodeNormalizedFold(); | ||
} | ||
|