Package railo.runtime.type.comparator

Examples of railo.runtime.type.comparator.TextComparator


  }
 
  private static Key[] keys(Collection coll) {
    Key[] keys=CollectionUtil.keys(coll);
    if(coll instanceof Array) return keys;
    TextComparator comp=new TextComparator(true,true);
    Arrays.sort(keys,comp);
    return keys;
  }
View Full Code Here


 

  private static Key[] order(Struct sct, Key[] keys) {
    if(sct instanceof StructImpl && ((StructImpl)sct).getType()==Struct.TYPE_LINKED) return keys;
   
    TextComparator comp=new TextComparator(true,true);
    Arrays.sort(keys,comp);
    return keys;
  }
View Full Code Here

    else throw new ExpressionException("invalid sort order type ["+sortOrder+"], sort order types are [asc and desc]");
   
    // text
    if(sortType.equalsIgnoreCase("text")) {
      if(localeSensitive)return toCollator(pc,Collator.IDENTICAL);
      return new TextComparator(isAsc,false);
    }
    // text no case
    else if(sortType.equalsIgnoreCase("textnocase")) {
      if(localeSensitive)return toCollator(pc,Collator.TERTIARY);
      return new TextComparator(isAsc,true);
    }
    // numeric
    else if(sortType.equalsIgnoreCase("numeric")) {
      return new NumberComparator(isAsc);
    }
View Full Code Here

TOP

Related Classes of railo.runtime.type.comparator.TextComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.