コード例 #1
0
 private void InitializeInstanceFields()
 {
     analyzer             = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, collator);
     firstRangeBeginning  = new BytesRef(collator.getCollationKey(firstRangeBeginningOriginal).toByteArray());
     firstRangeEnd        = new BytesRef(collator.getCollationKey(firstRangeEndOriginal).toByteArray());
     secondRangeBeginning = new BytesRef(collator.getCollationKey(secondRangeBeginningOriginal).toByteArray());
     secondRangeEnd       = new BytesRef(collator.getCollationKey(secondRangeEndOriginal).toByteArray());
 }
コード例 #2
0
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: public void testCollationKeySort() throws Exception
        public virtual void testCollationKeySort()
        {
            Analyzer usAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.US));
            Analyzer franceAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.FRANCE));
            Analyzer swedenAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("sv", "se")));
            Analyzer denmarkAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("da", "dk")));

            // The ICU Collator and Sun java.text.Collator implementations differ in their
            // orderings - "BFJDH" is the ordering for java.text.Collator for Locale.US.
            testCollationKeySort(usAnalyzer, franceAnalyzer, swedenAnalyzer, denmarkAnalyzer, oStrokeFirst ? "BFJHD" : "BFJDH", "EACGI", "BJDFH", "BJDHF");
        }
コード例 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testCollationKeySort() throws Exception
        public virtual void testCollationKeySort()
        {
            Analyzer usAnalyzer      = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.US));
            Analyzer franceAnalyzer  = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(Locale.FRANCE));
            Analyzer swedenAnalyzer  = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("sv", "se")));
            Analyzer denmarkAnalyzer = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("da", "dk")));

            // The ICU Collator and Sun java.text.Collator implementations differ in their
            // orderings - "BFJDH" is the ordering for java.text.Collator for Locale.US.
            testCollationKeySort(usAnalyzer, franceAnalyzer, swedenAnalyzer, denmarkAnalyzer, oStrokeFirst ? "BFJHD" : "BFJDH", "EACGI", "BJDFH", "BJDHF");
        }