sun.text.CollatorUtilities Java Examples

The following examples show how to use sun.text.CollatorUtilities. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CollationElementIterator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #2
Source File: CollationElementIterator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #3
Source File: CollationElementIterator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #4
Source File: CollationElementIterator.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #5
Source File: CollationElementIterator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #6
Source File: CollationElementIterator.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #7
Source File: CollationElementIterator.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #8
Source File: CollationElementIterator.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #9
Source File: CollationElementIterator.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #10
Source File: CollationElementIterator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #11
Source File: CollationElementIterator.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #12
Source File: CollationElementIterator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #13
Source File: CollationElementIterator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #14
Source File: CollationElementIterator.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #15
Source File: CollationElementIterator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #16
Source File: CollationElementIterator.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #17
Source File: CollationElementIterator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #18
Source File: CollationElementIterator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #19
Source File: CollationElementIterator.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #20
Source File: CollationElementIterator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #21
Source File: CollationElementIterator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #22
Source File: CollationElementIterator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #23
Source File: CollationElementIterator.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #24
Source File: CollationElementIterator.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #25
Source File: CollationElementIterator.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #26
Source File: CollationElementIterator.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #27
Source File: CollationElementIterator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}
 
Example #28
Source File: CollationElementIterator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #29
Source File: CollationElementIterator.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Resets the cursor to the beginning of the string.  The next call
 * to next() will return the first collation element in the string.
 */
public void reset()
{
    if (text != null) {
        text.reset();
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text.setMode(mode);
    }
    buffer = null;
    expIndex = 0;
    swapOrder = 0;
}
 
Example #30
Source File: CollationElementIterator.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * CollationElementIterator constructor.  This takes the source string and
 * the collation object.  The cursor will walk thru the source string based
 * on the predefined collation rules.  If the source string is empty,
 * NULLORDER will be returned on the calls to next().
 * @param sourceText the source string.
 * @param owner the collation object.
 */
CollationElementIterator(String sourceText, RuleBasedCollator owner) {
    this.owner = owner;
    ordering = owner.getTables();
    if ( sourceText.length() != 0 ) {
        NormalizerBase.Mode mode =
            CollatorUtilities.toNormalizerMode(owner.getDecomposition());
        text = new NormalizerBase(sourceText, mode);
    }
}