package ckg.prototype.closet.ContentManagement;

import java.util.ArrayList;
import java.util.Iterator;

public class ItemColorContainer implements Matchable {
	private ArrayList<ItemColor> mItems;

	public ItemColorContainer() {
		mItems = new ArrayList<ItemColor>();
	}
	
	public ItemColorContainer(ArrayList<ItemColor> items) {
		mItems = items;
	}

	public ItemColorContainer(ItemColor ... items) {
		mItems = new ArrayList<ItemColor>();
		
		for (int i = 0; i < items.length; i++) {
			mItems.add(items[i]);
		}
	}
	
	/**
	 * @Override
	 */
	public float getMatchPercentage(Matchable other) {
		return 0;
	}

	/**
	 * @Override
	 */
	public boolean Matches(Matchable other) {
		
		Iterator<ItemColor> iter = mItems.iterator();
		
		while (iter.hasNext())
		{
			ItemColor curr = iter.next();
			
			if (!curr.Matches(other)) {
				return false;
			}
		}
		
		return true;
	}
	
	
}
