HaniiPuppy

Recursive Constructor Invocation?

Mar 16th, 2015
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. public class ExclusiveRange<T extends Comparable> implements Range<T>
  2. {
  3.     public ExclusiveRange(T min, T max)
  4.     {
  5.         subranges = new ArrayList<FlatRange<T>>();
  6.         subranges.add(new ValueRange<T>(min, max));
  7.     }
  8.  
  9.     public ExclusiveRange(Range<? extends T> source)
  10.     { this(source.toListOfFlatRanges()); }
  11.  
  12.     public ExclusiveRange(Range<? extends T>... sources)
  13.     { this(Arrays.asList(sources)); }
  14.     // This line throws a Recursive Constructor Invocation error, when it calls another constructor that
  15.     // hasn't been written yet?
  16.  
  17.     public ExclusiveRange(Collection<? extends Range<? extends T>> sources)
  18.     {
  19.  
  20.     }
  21.  
  22.     public ExclusiveRange(T min, T max, Range<? extends T> toExclude)
  23.     {
  24.  
  25.     }
  26.  
  27.     public ExclusiveRange(T min, T max, Range<? extends T>... toExclude)
  28.     {
  29.  
  30.     }
  31.  
  32.     public ExclusiveRange(T min, T max, Collection<? extends Range<? extends T>> toExclude)
  33.     {
  34.  
  35.     }
  36.    
  37.     List<FlatRange<T>> subranges;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment