/*******************************************************************************
 *  Copyright 2017 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *    http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.hl7282.commoninterface;

import cdac.medinfo.sdk.hl7282.unrecognized.UnRecognizedSegment;

/**
 * Defines all the methods for SegmentSet.
 */
public interface ISegmentSet 
{
	/**
	 * Adds a Segment in list.
	 * @param objSegment instance of Segment
	 */
	void addSegment(ISegment objSegment);
	/**
	 * Adds unknown Segments in list.
	 * @param objUnRecognizedSegment object of UnRecognizedSegment
	 */
	void addUnRecognizedSegment(UnRecognizedSegment objUnRecognizedSegment);
	/**
	 * Retrieves list of Unrecognized segments.
	 * @return Isinglecollection<UnRecognizedSegment> - list of UnRecognized Segment
	 */
	ISingleCollection<UnRecognizedSegment> getUnRecognizedSegments();
	/**
	 * Retrieves list of segments.
	 * @return ISingleCollection<ISegment> - list of segments
	 */
	ISingleCollection<ISegment> getList();
	
	/**
	 * Retrieves segment instance from a given index position.
	 * @param iIndex value of index
	 * @return ISegment - instance of Segment
	 */
	ISegment getSegment(int iIndex);
	
	/**
	 * Retrieves a iterator to iterate through Segment List.
	 * @return ICollectionIterator<ISegment> instance of iterator
	 */
	ICollectionIterator<ISegment> iterator();
	
	/**
	 * Retrieves size of SegmentSet
	 * @return int - size of set
	 */
	int size();
}
