< prev index next >

jdk/test/valhalla/mvt/Interval.java

Print this page


   1 import jvm.internal.value.ValueCapableClass;
   2 
   3 @ValueCapableClass
   4 public final class Interval {
   5     public final int l;
   6     public final int u;
   7 
   8     public Interval(int l, int u) {
   9         if (l > u) throw new IllegalArgumentException();
  10         this.l = l;
  11         this.u = u;
  12     }
  13 
  14     @Override
  15     public boolean equals(Object o) {
  16         if (this == o) return true;
  17         if (o == null || getClass() != o.getClass()) return false;
  18 
  19         Interval that = (Interval) o;
  20 
  21         if (l != that.l) return false;
   1 import jdk.incubator.mvt.ValueCapableClass;
   2 
   3 @ValueCapableClass
   4 public final class Interval {
   5     public final int l;
   6     public final int u;
   7 
   8     public Interval(int l, int u) {
   9         if (l > u) throw new IllegalArgumentException();
  10         this.l = l;
  11         this.u = u;
  12     }
  13 
  14     @Override
  15     public boolean equals(Object o) {
  16         if (this == o) return true;
  17         if (o == null || getClass() != o.getClass()) return false;
  18 
  19         Interval that = (Interval) o;
  20 
  21         if (l != that.l) return false;
< prev index next >