StyleRangeComparator.java :  » Web-Services » minitor » com » predic8 » plugin » membrane » listeners » Java Open Source

Java Open Source » Web Services » minitor 
minitor » com » predic8 » plugin » membrane » listeners » StyleRangeComparator.java
package com.predic8.plugin.membrane.listeners;

import java.util.Comparator;

import org.eclipse.swt.custom.StyleRange;

public class StyleRangeComparator implements Comparator<StyleRange> {

  public int compare(StyleRange r1, StyleRange r2) {
    if (r1.start < r2.start)
      return -1;
    if (r1.start == r2.start)
      return 0;
    return 1;
  }
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.