All of the comparators that can be used for arguments.
768827
def build_comparators(*values_or_types):
    '''
    
    '''
    comparators = []
    for item in values_or_types:
        if isinstance(item, Comparator):
            comparators.append(item)
        elif isinstance(item, type):
            # If you are passing around a type you will have to build a Equals
            # comparator
            comparators.append(Any(IsA(item), Is(item)))
        else:
            comparators.append(Equals(item))
    return comparators
1364127
public function sortArguments()
    {
        $arguments = array();

        $expectedArguments = $this->di->get('argument')->getExpectedOrder();

        foreach ($expectedArguments as $pos => $key) {
            if (array_key_exists($pos, $this->arguments)) {
                $arguments[$key] = $this->di->get('argument')->validate($key, $this->arguments[$pos]);
            } else {
                $this->di->get('argument')->validate($key, null);
            }
        }

        $this->di->get('argument')->load($arguments);
    }
701690
def _check_arguments(self):
        """"""
        if self.argument_checked:
            return

        assert(self.symbol is not None)
        self.argument_checked = True

        # check if symbol contain duplicated names.
        _check_arguments(self.symbol)
        # rematch parameters to delete useless ones
        if self.allow_extra_params:
            if self.arg_params:
                arg_names = set(self.symbol.list_arguments())
                self.arg_params = {k : v for k, v in self.arg_params.items()
                                   if k in arg_names}
            if self.aux_params:
                aux_names = set(self.symbol.list_auxiliary_states())
                self.aux_params = {k : v for k, v in self.aux_params.items()
                                   if k in aux_names}
351996
private static final void checkComparators(int[] pos1, int[] pos2, 
							Class<? extends Key<?>>[] types1, Class<? extends Key<?>>[] types2)
	{
		if (pos1.length != pos2.length || types1.length != types2.length) {
			throw new IllegalArgumentException(
				"The given pair of RecordComparators does not operate on the same number of fields.");
		}
		for (int i = 0; i < types1.length; i++) {
			if (!types1[i].equals(types2[i])) {
				throw new IllegalArgumentException(
				"The given pair of RecordComparators does not operates on different data types.");
			}
		}
	}
186705
@SuppressWarnings("unchecked")
  public T compareAll() {
    this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets()
        .compareBucketCols().compareRawLocation().compareParameters();
    return (T) this;
  }
1306013
def p_argument_list(self, p):
        
        if len(p) == 2:
            p[0] = [p[1]]
        else:
            p[1].append(p[3])
            p[0] = p[1]
1008151
function parseComparator(comp, loose) {
  ;
  comp = replaceCarets(comp, loose);
  ;
  comp = replaceTildes(comp, loose);
  ;
  comp = replaceXRanges(comp, loose);
  ;
  comp = replaceStars(comp, loose);
  ;
  return comp;
}
390921
public static <T> T max(Iterator<T> self, Comparator<T> comparator) {
        return max((Iterable<T>)toList(self), comparator);
    }
551527
private Object parseComparatorArgument(CharSequenceScanner scanner) {

    int index = scanner.getCurrentIndex();
    Object comparatorArgument;
    char c = scanner.forcePeek();
    if ((c == '"') || (c == '\'')) {
      scanner.next();
      comparatorArgument = scanner.readUntil(c, false, c);
    } else {
      String argument = scanner.readWhile(FILTER_COMPARATOR_ARGUMENT);
      if (argument.length() == 0) {
        throw new IllegalArgumentException(scanner.substring(index, scanner.getCurrentIndex()));
      }
      if ("null".equals(argument)) {
        comparatorArgument = null;
      } else if (argument.matches(Iso8601UtilLimited.PATTERN_STRING_ALL)) {
        comparatorArgument = this.nlsDependencies.getIso8601Util().parseDate(argument);
      } else if (Boolean.TRUE.toString().equals(argument)) {
        comparatorArgument = Boolean.TRUE;
      } else if (Boolean.FALSE.toString().equals(argument)) {
        comparatorArgument = Boolean.FALSE;
      } else {
        // double vs. date?
        comparatorArgument = Double.valueOf(argument);
      }
    }
    return comparatorArgument;
  }
1231502
def arguments(self):
        
        length = conf.lib.clang_CompileCommand_getNumArgs(self.cmd)
        for i in xrange(length):
            yield str(conf.lib.clang_CompileCommand_getArg(self.cmd, i))
935145
def _compile_itemsort():
    ''''''

    def is_extra(key_):
        return key_ is Extra

    def is_remove(key_):
        return isinstance(key_, Remove)

    def is_marker(key_):
        return isinstance(key_, Marker)

    def is_type(key_):
        return inspect.isclass(key_)

    def is_callable(key_):
        return callable(key_)

    # priority list for map sorting (in order of checking)
    # We want Extra to match last, because it's a catch-all. On the other hand,
    # Remove markers should match first (since invalid values will not
    # raise an Error, instead the validator will check if other schemas match
    # the same value).
    priority = [(1, is_remove),  # Remove highest priority after values
                (2, is_marker),  # then other Markers
                (4, is_type),  # types/classes lowest before Extra
                (3, is_callable),  # callables after markers
                (5, is_extra)]  # Extra lowest priority

    def item_priority(item_):
        key_ = item_[0]
        for i, check_ in priority:
            if check_(key_):
                return i
        # values have hightest priorities
        return 0

    return item_priority
1050385
private void initComparators() {
		TupleMRConfigBuilder.initializeComparators(context.getHadoopContext()
		    .getConfiguration(), tupleMRConfig);
		customComparators = new RawComparator<?>[maxDepth + 1];
		for(int i = minDepth; i <= maxDepth; i++) {
			SortElement element = tupleMRConfig.getCommonCriteria().getElements().get(i);
			if(element.getCustomComparator() != null) {
				customComparators[i] = element.getCustomComparator();
			}
		}
	}
342491
def args_match(m_args, m_kwargs, default, *args, **kwargs):
    
    if len(m_args) > len(args):
        return False
    for m_arg, arg in zip(m_args, args):
        matches = arg_match(m_arg, arg, eq)
        if not matches or matches is InvalidArg:
            return False  # bail out

    if m_kwargs:
        for name, m_arg in m_kwargs.items():
            name, comparator = arg_comparitor(name)
            arg = kwargs.get(name)
            if not arg_match(m_arg, arg, comparator, default):
                return False  # bail out
    return True
302168
static <V> int compare(Comparator<V> cmp, Object a, Object b)
    {
        if (a instanceof Special)
            return ((Special) a).compareTo(b);
        if (b instanceof Special)
            return -((Special) b).compareTo(a);
        return cmp.compare((V) a, (V) b);
    }
805397
private void computeComparableValue() {
    recomputeComparableSortValue = false;
    try {
      int type = getCompareValueType();
      switch (type) {
      case 0:
        comparableSortValue = getCompareValue0();
        break;
      case 1:
        comparableSortValue = getCompareValue1();
        break;
      case 2:
        comparableSortValue = getCompareValue2();
        break;
      default:
        comparableSortValue = null;
        break;
      }
    } catch (IOException e) {
      log.debug(e);
      comparableSortValue = null;
    }
  }
499355
def get_comparison_methods():
    
    method_list = []
    def _register(func):
        method_list.append(func)
        return func

    # Comparison operators for sorting and uniqueness
    @_register
    def __lt__(self, other):
        return compare_instance(op.lt, self, other)

    @_register
    def __le__(self, other):
        return compare_instance(op.le, self, other)

    @_register
    def __eq__(self, other):
        return compare_instance(op.eq, self, other)

    @_register
    def __ne__(self, other):
        return compare_instance(op.ne, self, other)

    @_register
    def __gt__(self, other):
        return compare_instance(op.gt, self, other)

    @_register
    def __ge__(self, other):
        return compare_instance(op.ge, self, other)

    return method_list
964603
function methodComparator (a, b) {
    const sectionA = spec[a].section || '';
    const sectionB = spec[b].section || '';

    return sectionA.localeCompare(sectionB) || a.localeCompare(b);
  }