Package gnu.inet.encoding
Class RangeSet.Range
- java.lang.Object
-
- gnu.inet.encoding.RangeSet.Range
-
- All Implemented Interfaces:
java.lang.Comparable<RangeSet.Range>
- Enclosing class:
- RangeSet
public static final class RangeSet.Range extends java.lang.Object implements java.lang.Comparable<RangeSet.Range>
-
-
Constructor Summary
Constructors Constructor Description Range(int single)Range(int first, int last)Range(RangeSet.Range firstRange, RangeSet.Range lastRange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RangeSet.Range other)booleancontains(int i)booleancontains(RangeSet.Range other)Checks if this range completely can contain the other range.booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
Range
public Range(int first, int last)
-
Range
public Range(int single)
-
Range
public Range(RangeSet.Range firstRange, RangeSet.Range lastRange)
-
-
Method Detail
-
contains
public boolean contains(int i)
-
contains
public boolean contains(RangeSet.Range other)
Checks if this range completely can contain the other range.- Parameters:
other- other range to verify- Returns:
trueif other completely contained by this, otherwisefalse
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(RangeSet.Range other)
- Specified by:
compareToin interfacejava.lang.Comparable<RangeSet.Range>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-