Example usage for java.lang Character compare

List of usage examples for java.lang Character compare

Introduction

In this page you can find the example usage for java.lang Character compare.

Prototype

public static int compare(char x, char y) 

Source Link

Document

Compares two char values numerically.

Usage

From source file:termint.gui.vt.VTElement.java

public int compareTo(VTElement o) {
    int cmp = Character.compare(c, o.c);
    if (cmp != 0)
        return cmp;
    cmp = bg.compareTo(o.bg);/*  w  ww  . ja v a 2 s.  c om*/
    if (cmp != 0)
        return cmp;
    cmp = fg.compareTo(o.fg);
    if (cmp != 0)
        return cmp;
    cmp = Boolean.compare(bold, o.bold);
    if (cmp != 0)
        return cmp;
    cmp = Boolean.compare(invert, o.invert);
    if (cmp != 0)
        return cmp;
    cmp = Boolean.compare(invisible, o.invisible);
    if (cmp != 0)
        return cmp;
    cmp = Boolean.compare(low, o.low);
    if (cmp != 0)
        return cmp;
    cmp = Boolean.compare(underline, o.underline);
    return cmp;
}