Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ExclusiveRange<T extends Comparable> implements Range<T>
- {
- public ExclusiveRange(T min, T max)
- {
- subranges = new ArrayList<FlatRange<T>>();
- subranges.add(new ValueRange<T>(min, max));
- }
- public ExclusiveRange(Range<? extends T> source)
- { this(source.toListOfFlatRanges()); }
- public ExclusiveRange(Range<? extends T>... sources)
- { this(Arrays.asList(sources)); }
- // This line throws a Recursive Constructor Invocation error, when it calls another constructor that
- // hasn't been written yet?
- public ExclusiveRange(Collection<? extends Range<? extends T>> sources)
- {
- }
- public ExclusiveRange(T min, T max, Range<? extends T> toExclude)
- {
- }
- public ExclusiveRange(T min, T max, Range<? extends T>... toExclude)
- {
- }
- public ExclusiveRange(T min, T max, Collection<? extends Range<? extends T>> toExclude)
- {
- }
- List<FlatRange<T>> subranges;
- }
Advertisement
Add Comment
Please, Sign In to add comment