summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java
blob: a4fab6735eac347363738138ac9cc5d607a40377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package bjc.utils.data.lazy;

/**
 * Interface for some maintenance operations on lazy objects
 * 
 * @author ben
 *
 */
public interface ILazy {
	/**
	 * Check if this object has been materialized
	 * 
	 * @return Whether or not this object has been materialized
	 */
	public boolean isMaterialized();

	/**
	 * Check if there are pending actions that need to be applied
	 * 
	 * @return Whether or not there are pending actions
	 */
	public boolean hasPendingActions();

	/**
	 * Make this object materialize itelf
	 */
	public void materialize();

	/**
	 * Make this object apply any pending objects
	 * 
	 * As a requirement, will materialize the object if it is not materialized
	 */
	public void applyPendingActions();
}