Gets the sort priority of an object based on its type using 'this.typeSortPriority'.
@method getTypeSortPriority
@param {Object} obj
@return {Number}
322119
function(obj){
            for(var i = this.typeSortPriority.length - 1; i >= 0; i--){
                var type = this.typeSortPriority[i];
                if(obj instanceof type){
                    return i;
                }
            }
        }
524567
function orderByComparator(a, b) {
    if (a === null || typeof a === 'undefined')
        a = 0;
    if (b === null || typeof b === 'undefined')
        b = 0;
    if (a instanceof Date && b instanceof Date) {
        if (a < b)
            return -1;
        if (a > b)
            return 1;
    }
    else if ((isNaN(parseFloat(a)) || !isFinite(a)) || (isNaN(parseFloat(b)) || !isFinite(b))) {
        // Convert to string in case of a=0 or b=0
        a = String(a);
        b = String(b);
        // Isn't a number so lowercase the string to properly compare
        if (a.toLowerCase() < b.toLowerCase())
            return -1;
        if (a.toLowerCase() > b.toLowerCase())
            return 1;
    }
    else {
        // Parse strings as numbers to compare properly
        if (parseFloat(a) < parseFloat(b))
            return -1;
        if (parseFloat(a) > parseFloat(b))
            return 1;
    }
    // equal each other
    return 0;
}
1249394
public int compareTo(CmsJspNavElement obj) {

        if (obj == this) {
            return 0;
        }
        float pos = obj.getNavPosition();
        // please note: can't just subtract and cast to int here because of float precision loss
        if (m_position == pos) {
            return 0;
        }
        return (m_position < pos) ? -1 : 1;
    }
222865
public int compareTo(Object obj) {
		LdapRdnComponent that = (LdapRdnComponent) obj;

        // It's safe to compare directly against key and value,
        // because they are validated not to be null on instance creation.
        int keyCompare = this.key.toLowerCase().compareTo(that.key.toLowerCase());
        if(keyCompare == 0) {
            return this.value.toLowerCase().compareTo(that.value.toLowerCase());
        } else {
            return keyCompare;
        }
	}
318636
private Integer getPriority(Map<String, Object> mutableRData) {
    Integer priority = null;

    if (mutableRData.containsKey("priority")) { // SRVData
      priority = Integer.class.cast(mutableRData.remove("priority"));
    } else if (mutableRData.containsKey("preference")) { // MXData
      priority = Integer.class.cast(mutableRData.remove("preference"));
    }

    return priority;
  }
608159
@Override
	@SuppressWarnings("unchecked")
	@Pure
	public int indexOf(Object obj) {
		if (obj == null) {
			return -1;
		}
		final P element;
		try {
			element = (P) obj;
		} catch (ClassCastException exception) {
			return -1;
		}
		final Iterator<P> iter = this.tree.dataDepthFirstIterator();
		P data;
		int idx = 0;
		while (iter.hasNext()) {
			data = iter.next();
			if (data == element) {
				return idx;
			}
			++idx;
		}
		return -1;
	}
816271
public function getPriority(ObjectHandlable $object)
    {
        $result = false;

        if($handle = $object->getHandle())
        {
            if($this->__priority_list->offsetExists($handle)) {
                $result = $this->__priority_list->offsetGet($handle);
            }
        }

        return $result;
    }
1037199
function sortObjectSchema(object, options) {
  var sort = {asc: sortAsc, desc: sortDesc},
      keys = Object.keys(object),
      outputObject = {};

  if (options.sort) {
    keys.sort(sort[options.sort]);
  }

  keys.forEach(function(key, index) {
    if (isObjectObject(object[key])) {
      object[key] = sortObjectSchema(object[key], options);
    }
    outputObject[keys[index]] = object[keys[index]];
  });

  return outputObject;
}
501682
protected Integer findOrder(Object obj) {
		// Check for regular Ordered interface
		Integer order = super.findOrder(obj);
		if (order != null) {
			return order;
		}

		// Check for @Order annotation on various kinds of elements
		if (obj instanceof Class) {
			return OrderUtils.getOrder((Class) obj);
		}
		else if (obj instanceof Method) {
			Order ann = AnnotationUtils.findAnnotation((Method) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj instanceof AnnotatedElement) {
			Order ann = AnnotationUtils.getAnnotation((AnnotatedElement) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj != null) {
			return OrderUtils.getOrder(obj.getClass());
		}

		return null;
	}
1253943
public int lastIndexOf(Object obj) {
        if (obj instanceof JavascriptObject) {
            return checkInteger(invokeJavascript("lastIndexOf", ((JavascriptObject) obj).getJSObject()), -1);
        }
        return checkInteger(invokeJavascript("lastIndexOf", obj), -1);
    }
690496
function (obj) {
        if (
            !obj
            || {}.toString.call(obj) !== '[object Object]'
            || obj.nodeType
            || obj.setInterval
        ) {
            return false
        }

        var hasOwn              = {}.hasOwnProperty;
        var hasOwnConstructor   = hasOwn.call(obj, 'constructor');
        // added test for node > v6
        var hasMethodPrototyped = ( typeof(obj.constructor) != 'undefined' ) ? hasOwn.call(obj.constructor.prototype, 'isPrototypeOf') : false;


        if (
            obj.constructor && !hasOwnConstructor && !hasMethodPrototyped
        ) {
            return false
        }

        //Own properties are enumerated firstly, so to speed up,
        //if last one is own, then all properties are own.
        var key;
        return key === undefined || hasOwn.call(obj, key)
    }
1159633
public Iterator<Integer> getBshIterator(final Number obj) {
        int number = obj.intValue();
        if (number == 0)
            return this.emptyIt();
        if (number > 0)
            return IntStream.rangeClosed(0, number).iterator();
        return IntStream.rangeClosed(number, 0).map(i -> number - i).iterator();
    }
478397
public int indexOf( T obj ) {
		for (int i = 0; i < size; i++) {
			if( data[i].equals(obj) ) {
				return i;
			}
		}
		return -1;
	}
1049999
function(obj){
    return _(obj).keys().sort().reduce(function(memo, key) {
        memo[key] = obj[key];
        return memo;
    }, {});
}
1129960
function checkSort(obj) {
  var count = 0
  Object.keys(obj).forEach(key=> {
    if (obj[key] === '**String') count += 1
    if (obj[key] === '**Number') count += 1
  })
  return count <= 1
}
576482
function sort(o) {
    if (self.getType(o) === 'object') {
      return Object.keys(o).sort().map(function(key) {
        return { k: key, v: sort(o[key]) };
      });
    } 
    return o;
  }
838099
function ( obj ) {
		var result = 0;

		if ( obj.length > 0 ) {
			result = obj.reduce( function ( prev, cur ) {
				return prev + cur;
			});
		}

		return result;
	}