public boolean hasNext() { fill(); return next1!=null || next2!=null; }
public Iterator<DicomElement> iterator(int fromTag, int toTag) { Iterator<DicomElement> it1 = ds1.iterator(fromTag,toTag); Iterator<DicomElement> it2 = ds2.iterator(fromTag,toTag); return new DicomElementCombineIterator(it1,it2); }
public DicomElement next() { fill(); if( next1==null ) { DicomElement ret = next2; next2 = null; return ret; } if( next2==null ) { DicomElement ret = next1; next1 = null; return ret; } if( next1.tag() < next2.tag() ) { DicomElement ret = next1; next1 = null; return ret; } DicomElement ret = next2; next2 = null; return ret; }