Skip to main content
summaryrefslogtreecommitdiffstats
blob: d3c7bf7f54419612b4f8bf50ca4329e1341205c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
 * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0 
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
 * 
 * 
 *  This copyright notice shows up in the generated Java code
 */
package org.eclipse.osbp.xtext.table.jvmmodel;

import java.util.Comparator;

/**
 * <p>Helper class for a Treemap in order to make double values comparable.</p>
 */
@SuppressWarnings("all")
public class DoubleComparator implements Comparator<Double> {
  @Override
  public int compare(final Double arg0, final Double arg1) {
    boolean _lessThan = (arg0.compareTo(arg1) < 0);
    if (_lessThan) {
      return (-1);
    } else {
      boolean _greaterThan = (arg0.compareTo(arg1) > 0);
      if (_greaterThan) {
        return 1;
      } else {
        return 0;
      }
    }
  }
}

Back to the top