Compare the given indexterm with current term.

@param obj object to compare with
@return int
198880
@Override
    public int compareTo(final IndexTerm obj) {
        return DITAOTCollator.getInstance(termLocale).compare(termKey, obj.getTermKey());
    }
410324
@Override
    public int indexOf(Object arg0) {
        int indexOf = allResults.indexOf(arg0);
        if ( indexOf >= 0 )
            return indexOf;

        while ( nextResultsAvailable() ) {
            indexOf = nextResults.indexOf(arg0);
            int size = allResults.size();
            moveNextResults();
            if ( indexOf >= 0 )
                return indexOf + size;
        }

        return -1;
    }
322527
@Override
    public int compareTo(Object obj)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "compareTo", obj);

        UUID other = (UUID) obj; // Allowed to throw ClassCastException

        int result = 0;

        if (equals(other))
        {
            result = 0;
        }
        else if (_unexpectedFormat)
        {
            // This UUID is in an unexpected format so we do not have
            // uuidHigh and uuidLow to compare. Instead we compare the
            // two UUID's hash codes (the sum of each byte of their
            // byte array form).
            result = Integer.valueOf(hashCode()).compareTo(Integer.valueOf(other.hashCode()));
        }
        else
        {
            result = Long.valueOf(_uuidHigh).compareTo(Long.valueOf(other._uuidHigh));

            if (result == 0)
            {
                result = Long.valueOf(_uuidLow).compareTo(Long.valueOf(other._uuidLow));
            }
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "compareTo", Integer.valueOf(result));
        return result;
    }
1297615
public int compare(Object objA, Object objB)
    {
        String idAStr = ((FieldDescriptorDef)_fields.get(objA)).getProperty("id");
        String idBStr = ((FieldDescriptorDef)_fields.get(objB)).getProperty("id");
        int    idA;
        int    idB;

        try
        {
            idA = Integer.parseInt(idAStr);
        }
        catch (Exception ex)
        {
            return 1;
        }
        try
        {
            idB = Integer.parseInt(idBStr);
        }
        catch (Exception ex)
        {
            return -1;
        }
        return idA < idB ? -1 : (idA > idB ? 1 : 0);
    }
366795
public function equals($obj)
    {
        // TODO: optimize me with early outs
        if ($this === $obj) {
            return true;
        }

        if ((null === $obj) || !($obj instanceof AbstractCriterion)) {
            return false;
        }

        /** @var AbstractCriterion $crit */
        $crit = $obj;

        $isEquiv = (((null === $this->table && null === $crit->getTable())
            || (null !== $this->table && $this->table === $crit->getTable()))
            && $this->column === $crit->getColumn()
            && $this->comparison === $crit->getComparison())
        ;

        // check chained criterion

        $clausesLength = count($this->clauses);
        $isEquiv &= (count($crit->getClauses()) == $clausesLength);
        $critConjunctions = $crit->getConjunctions();
        $critClauses = $crit->getClauses();
        for ($i = 0; $i < $clausesLength && $isEquiv; $i++) {
            $isEquiv &= ($this->conjunctions[$i] === $critConjunctions[$i]);
            $isEquiv &= ($this->clauses[$i] === $critClauses[$i]);
        }

        if ($isEquiv) {
            $isEquiv &= $this->value === $crit->getValue();
        }

        return $isEquiv;
    }
1066086
@Pure
	@Override
	@SuppressWarnings({"unchecked", "checkstyle:npathcomplexity"})
	public int compareTo(Object obj) {
		final Object oth = (obj instanceof Reference) ? ((Reference<?>) obj).get() : obj;
		final T cur = get();

		if (oth == null && cur == null) {
			return 0;
		}
		if (cur == null) {
			return 1;
		}
		if (oth == null) {
			return -1;
		}

		if (cur instanceof Comparable) {
			try {
				return ((Comparable<Object>) cur).compareTo(oth);
			} catch (AssertionError e) {
				throw e;
			} catch (Throwable exception) {
				//
			}
		}

		if (oth instanceof Comparable) {
			try {
				return -((Comparable<Object>) oth).compareTo(cur);
			} catch (AssertionError e) {
				throw e;
			} catch (Throwable exception) {
				//
			}
		}

		return oth.hashCode() - cur.hashCode();
	}
322119
function(obj){
            for(var i = this.typeSortPriority.length - 1; i >= 0; i--){
                var type = this.typeSortPriority[i];
                if(obj instanceof type){
                    return i;
                }
            }
        }
1087144
public static <T> int compareTo(Comparable<T> object1, T object2) {
		if (object1 == object2) {
			return 0;
		}
		if (object1 == null) {
			return Integer.MIN_VALUE;
		}
		if (object2 == null) {
			return Integer.MAX_VALUE;
		}
		assert object1 != null && object2 != null;
		return object1.compareTo(object2);
	}
1361162
function getIndex(objects, obj) {

            var i;
            for (i = 0; i < objects.length; i++) {
                if (objects[i] === obj) {
                    return i;
                }
            }

            return -1;
        }
1113673
public function Equals($obj)
	{
		if ( ! $obj instanceof NMTOKENValue )
		{
			return false;
		}

		/**
		 * @var TokenValue $other
		 */
		$other = $obj;
		return strcmp( $this->Value, $other->Value ) == 0;
	}
855761
public function Equals( $obj )
	{
		if ( ! $obj instanceof NameValue )
		{
			return false;
		}

		/**
		 * @var TokenValue $other
		 */
		$other = $obj;
		return strcmp( $this->Value, $other->Value ) == 0;
	}
1269547
public function Equals($obj)
	{
		if ( ! $obj instanceof IDValue )
		{
			return false;
		}

		/**
		 * @var TokenValue $other
		 */
		$other = $obj;
		return strcmp( $this->Value, $other->Value ) == 0;
	}
854987
public static <E> int compare(final Comparable<E> obj1, final E obj2) {
        if (obj1 == obj2) {
            return 0;
        }
        if (obj1 == null) {
            return -1;
        }
        if (obj2 == null) {
            return 1;
        }

        return obj1.compareTo(obj2);
    }
8485
protected Integer findOrder(Object obj) {
		return (obj instanceof Ordered ? ((Ordered) obj).getOrder() : null);
	}
1364922
public int getCount(T obj) {
        int objIndex = (allowNewIndices) 
            ? objectIndices.index(obj)
            : objectIndices.find(obj);
        return (objIndex < 0) ? 0 : indexToCount.get(objIndex);
    }
769228
@Override
    public int compareTo(Object object)
    {
    	if(!(object instanceof User))
    	{
    		return -1;
    		
    	}
    	User user = (User)object;
       
        return getLastName().compareTo(user.getLastName());
        
    }
60219
static Object getIndexObject(String s)
    {
        long indexTest = indexFromString(s);
        if (indexTest >= 0) {
            return Integer.valueOf((int)indexTest);
        }
        return s;
    }