@Test void testEquals() throws InvalidVersionRangeException { assertEquals(new DefaultVersionRange("[1.0,2.0]"), new DefaultVersionRange("[1.0,2.0]")); assertEquals(new DefaultVersionRange("[1.0]"), new DefaultVersionRange("[1.0,1.0]")); assertNotEquals(new DefaultVersionRange("[1.0,2.0)"), new DefaultVersionRange("[1.0.2.0]")); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } boolean equals; if (obj instanceof DefaultVersionRange) { equals = equals((DefaultVersionRange) obj); } else if (obj instanceof VersionRange) { try { equals = equals(new DefaultVersionRange(((VersionRange) obj).getValue())); } catch (InvalidVersionRangeException e) { equals = false; } } else { equals = false; } return equals; }
DefaultVersionRange implements VersionRange { @Override public boolean equals(Object obj) { if (obj == this) { return true; } boolean equals; if (obj instanceof DefaultVersionRange) { equals = equals((DefaultVersionRange) obj); } else if (obj instanceof VersionRange) { try { equals = equals(new DefaultVersionRange(((VersionRange) obj).getValue())); } catch (InvalidVersionRangeException e) { equals = false; } } else { equals = false; } return equals; } }
DefaultVersionRange implements VersionRange { @Override public boolean equals(Object obj) { if (obj == this) { return true; } boolean equals; if (obj instanceof DefaultVersionRange) { equals = equals((DefaultVersionRange) obj); } else if (obj instanceof VersionRange) { try { equals = equals(new DefaultVersionRange(((VersionRange) obj).getValue())); } catch (InvalidVersionRangeException e) { equals = false; } } else { equals = false; } return equals; } DefaultVersionRange(String rawRange);  DefaultVersionRange(Version lowerBound, boolean lowerBoundInclusive, Version upperBound,
        boolean upperBoundInclusive); }
DefaultVersionRange implements VersionRange { @Override public boolean equals(Object obj) { if (obj == this) { return true; } boolean equals; if (obj instanceof DefaultVersionRange) { equals = equals((DefaultVersionRange) obj); } else if (obj instanceof VersionRange) { try { equals = equals(new DefaultVersionRange(((VersionRange) obj).getValue())); } catch (InvalidVersionRangeException e) { equals = false; } } else { equals = false; } return equals; } DefaultVersionRange(String rawRange);  DefaultVersionRange(Version lowerBound, boolean lowerBoundInclusive, Version upperBound,
        boolean upperBoundInclusive); Version getLowerBound(); Version getUpperBound(); @Override boolean containsVersion(Version version); boolean containsVersion(DefaultVersion version); @Override String getValue(); @Override boolean isCompatible(VersionRange otherRange); boolean isCompatible(DefaultVersionRange otherRange); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean equals(DefaultVersionRange version); }
DefaultVersionRange implements VersionRange { @Override public boolean equals(Object obj) { if (obj == this) { return true; } boolean equals; if (obj instanceof DefaultVersionRange) { equals = equals((DefaultVersionRange) obj); } else if (obj instanceof VersionRange) { try { equals = equals(new DefaultVersionRange(((VersionRange) obj).getValue())); } catch (InvalidVersionRangeException e) { equals = false; } } else { equals = false; } return equals; } DefaultVersionRange(String rawRange);  DefaultVersionRange(Version lowerBound, boolean lowerBoundInclusive, Version upperBound,
        boolean upperBoundInclusive); Version getLowerBound(); Version getUpperBound(); @Override boolean containsVersion(Version version); boolean containsVersion(DefaultVersion version); @Override String getValue(); @Override boolean isCompatible(VersionRange otherRange); boolean isCompatible(DefaultVersionRange otherRange); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean equals(DefaultVersionRange version);  }