/** * Input an instance for filtering. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). * @throws IllegalStateException if no input format has been set */ @Override public boolean input(Instance instance) throws Exception { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if ((m_OutputFormatDefined) && ((!m_useReplaceMissing) || isFirstBatchDone())) { if (m_replaceMissing != null) { m_replaceMissing.input(instance); instance = m_replaceMissing.output(); } m_ntob.input(instance); instance = m_ntob.output(); push(convertInstance(instance), false); return true; } bufferInput(instance); return false; }
/** * Input an instance for filtering. * * @param instance the input instance * @return true if the filtered instance may now be collected with output(). * @throws IllegalStateException if no input format has been set */ @Override public boolean input(Instance instance) throws Exception { if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if ((m_OutputFormatDefined) && ((!m_useReplaceMissing) || isFirstBatchDone())) { if (m_replaceMissing != null) { m_replaceMissing.input(instance); instance = m_replaceMissing.output(); } m_ntob.input(instance); instance = m_ntob.output(); push(convertInstance(instance), false); return true; } bufferInput(instance); return false; }