Cleanup the getLIBS function in LocusIterator
-- Now throws an UnsupportedOperationException in the base class. Only LocusView implements this function and actually returns the LIBS
This commit is contained in:
parent
f7b80116d6
commit
008b617577
|
|
@ -214,7 +214,13 @@ public abstract class LocusView extends LocusIterator implements View {
|
|||
return locus.containsP(location);
|
||||
}
|
||||
|
||||
// TODO -- remove me
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* Since this class has an actual LIBS, so this function will never throw an exception
|
||||
*
|
||||
* @return the LocusIteratorByState used by this view to get pileups
|
||||
*/
|
||||
@Override
|
||||
public LocusIteratorByState getLIBS() {
|
||||
return loci.getLIBS();
|
||||
|
|
|
|||
|
|
@ -34,11 +34,6 @@ import java.util.Iterator;
|
|||
* Iterator that traverses a SAM File, accumulating information on a per-locus basis
|
||||
*/
|
||||
public abstract class LocusIterator implements Iterable<AlignmentContext>, CloseableIterator<AlignmentContext> {
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// constructors and other basic operations
|
||||
//
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
public Iterator<AlignmentContext> iterator() {
|
||||
return this;
|
||||
}
|
||||
|
|
@ -50,9 +45,15 @@ public abstract class LocusIterator implements Iterable<AlignmentContext>, Close
|
|||
public abstract boolean hasNext();
|
||||
public abstract AlignmentContext next();
|
||||
|
||||
// TODO -- remove me when ART testing is done
|
||||
/**
|
||||
* Get, if possible, the underlying LocusIteratorByState from this LocusIterator.
|
||||
*
|
||||
* @throws UnsupportedOperationException if we don't support this operation
|
||||
*
|
||||
* @return a non-null locus iterator by state
|
||||
*/
|
||||
public LocusIteratorByState getLIBS() {
|
||||
return null;
|
||||
throw new UnsupportedOperationException("This locus iterator does not support getting the underlying LocusIteratorByState");
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue