summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java b/BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java
new file mode 100644
index 0000000..a4fab67
--- /dev/null
+++ b/BJC-Utils2/src/main/java/bjc/utils/data/lazy/ILazy.java
@@ -0,0 +1,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();
+}