Class SweepLineInterval

 1  
 2  
 3 /*
 4  * Copyright (c) 2016 Vivid Solutions.
 5  *
 6  * All rights reserved. This program and the accompanying materials
 7  * are made available under the terms of the Eclipse Public License 2.0
 8  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
 9  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html
10  * and the Eclipse Distribution License is available at
11  *
12  * http://www.eclipse.org/org/documents/edl-v10.php.
13  */
14 package org.locationtech.jts.index.sweepline;
15  
16 /**
17  * @version 1.7
18  */
19 public class SweepLineInterval {
20  
21   private double minmax;
22   private Object item;
23  
24   public SweepLineInterval(double min, double max)
25   {
26     this(min, max, null);
27   }
28  
29   public SweepLineInterval(double min, double max, Object item)
30   {
31     this.min = min < max ? min : max;
32     this.max = max > min ? max : min;
33     this.item = item;
34   }
35  
36   public double getMin() { return min;  }
37   public double getMax() { return max;  }
38   public Object getItem() { return item; }
39  
40 }
41