      * @param a first item
      * @param b second item
      * @param options combination of Stream.CASEINSENSITIVE | Stream.DESCENDING | Stream.NUMERIC
+     * @param equals compare is used to check equality
      * @return -1, 0, 1
      */
     public function comparator(a:Object, b:Object, options:uint = 0, equals:Boolean = false):int

                    {
                        case TypeCache.BOOLEAN:
                        {
                            result = Comparator.numericCompare(a, b);
                            break;
                        }

                        case TypeCache.NUMBER:
                        {
                            result = Comparator.numericCompare(a, b);
                            break;
                        }

                        case TypeCache.STRING:
                        {
                            result = Comparator.stringCompare(a, b, caseInsensitive);
                            break;
                        }

                        case TypeCache.DATE:
                        {
                            result = Comparator.dateCompare(a, b);
                            break;
                        }

                        case TypeCache.XML_TYPE:
                        {
                            result = Comparator.xmlCompare(a, b, numeric, caseInsensitive);
                            break;
                        }
                        default:


class Comparator
{
    public static function numericCompare(fa:Number, fb:Number):int
    {
        if (isNaNFast(fa) && isNaNFast(fb))
            return 0;

