/**
 * Copyright 2010-2013 Jingjing Li.
 *
 * This file is part of jplot2d.
 *
 * jplot2d is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or any later version.
 *
 * jplot2d is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with jplot2d. If not, see .
 */
package org.jplot2d.renderer;

import java.util.List;

import org.jplot2d.element.impl.ComponentEx;

/**
 * A block holds subcomponents of a cacheable component.
 * 
 * @author Jingjing Li
 */
public class CacheableBlock {
	/**
	 * The original component, act as uid
	 */
	private final ComponentEx uid;

	/**
	 * The component copy for rendering
	 */
	private final ComponentEx comp;

	/**
	 * The sub-component copies for rendering, contains comp
	 */
	private final List subcomps;

	/**
	 * @param comp
	 *            the original component, act as uid
	 * @param copy
	 *            the component copy for rendering
	 * @param subcomps
	 *            the sub-component copies for rendering, contains comp
	 */
	public CacheableBlock(ComponentEx comp, ComponentEx copy, List subcomps) {
		this.uid = comp;
		this.comp = copy;
		this.subcomps = subcomps;
	}

	public ComponentEx getUid() {
		return uid;
	}

	public ComponentEx getComp() {
		return comp;
	}

	public List getSubcomps() {
		return subcomps;
	}
}
 

Ads help maintain this website.