FileDocCategorySizeDatePackage
Collate3.javaAPI DocExample1256Sat Sep 12 03:01:00 BST 1998None

Collate3

public class Collate3 extends Object
Comparison using Collator objects.
see
com.objectspace.jgl.predicates.LessCollator
see
com.objectspace.jgl.predicates.LessEqualCollator
see
com.objectspace.jgl.predicates.GreaterCollator
see
com.objectspace.jgl.predicates.GreaterEqualCollator
see
java.text.Collator
version
3.0.0
author
ObjectSpace, Inc.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    show( "old style", new LessString() );
    show( "default collating", new LessCollator() );

    Collator collator = Collator.getInstance();
    collator.setStrength( Collator.PRIMARY );
    show( "case insensitive", new LessCollator( collator ) );
    
public static voidshow(java.lang.String tag, BinaryPredicate predicate)

    // create a set with given comparitor that allows duplicates
    OrderedSet set = new OrderedSet( predicate, true );

    // add a few entries
    set.add( "Texas" );
    set.add( "texas" );
    set.add( "Texas Fight" );

    // print the resulting container
    System.out.println( tag + "\n\t" + set );