code: public List<Period> _Combine( List<Period> periods1, List<Period> periods2 )
  	{
  		List<Period> result = new ArrayList<Period>();
  
  		int count1 = periods1.size();
  		int count2 = periods2.size();
  
  		int i = 0;
  		int j = 0;
  		while( i < count1 && j < count2 )
  		{
  			if( periods1.get( i ).getFrom().compareTo( periods2.get( j ).from ) <= 0 )
  			{
  				result.add( periods1.get( i ) );
  				i++;
  			}
  			else
  			{
  				result.add( periods2.get( j ) );
  				j++;
  			}
  		}
  		while( i < count1 )
  		{
  			result.add( periods1.get( i ) );
  			i++;
  		}
  		while( j < count2 )
  		{
  			result.add( periods2.get( j ) );
  			j++;
  		}
  
  		return result;
  	}
docs: combine two period arrays ordered by from date