summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/VectorProperty.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/VectorProperty.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/VectorProperty.java')
-rw-r--r--NET/worlds/scape/VectorProperty.java96
1 files changed, 96 insertions, 0 deletions
diff --git a/NET/worlds/scape/VectorProperty.java b/NET/worlds/scape/VectorProperty.java
new file mode 100644
index 0000000..d5e3d77
--- /dev/null
+++ b/NET/worlds/scape/VectorProperty.java
@@ -0,0 +1,96 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import java.util.Enumeration;
+/* */ import java.util.Hashtable;
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class VectorProperty
+/* */ extends Property
+/* */ {
+/* */ private PropAdder adder;
+/* 24 */ private boolean allowSorting = true;
+/* */
+/* */ public VectorProperty(Properties owner, int index, String propName)
+/* */ {
+/* 28 */ super(owner, index, propName);
+/* */ }
+/* */
+/* */ public static Vector<Object> toVector(Object[] arr)
+/* */ {
+/* 33 */ Vector<Object> v = new Vector(arr.length);
+/* 34 */ for (int i = 0; i < arr.length; i++)
+/* 35 */ v.addElement(arr[i]);
+/* 36 */ return v;
+/* */ }
+/* */
+/* */ public static Vector<Object> toVector(Hashtable<String, ?> hash)
+/* */ {
+/* 41 */ Vector<Object> v = new Vector(hash.size());
+/* */
+/* 43 */ Enumeration<Object> e = hash.elements();
+/* 44 */ while (e.hasMoreElements())
+/* 45 */ v.addElement(e.nextElement());
+/* 46 */ return v;
+/* */ }
+/* */
+/* */ public Object delete(Object obj)
+/* */ {
+/* 51 */ assert (obj != null);
+/* 52 */ assert (this.adder != null);
+/* 53 */ return operate(4, obj);
+/* */ }
+/* */
+/* */ public Object add(Object obj)
+/* */ {
+/* 58 */ assert (obj != null);
+/* 59 */ assert (this.adder != null);
+/* 60 */ return operate(3, obj);
+/* */ }
+/* */
+/* */ public boolean addTest(Object obj)
+/* */ {
+/* 65 */ assert (obj != null);
+/* 66 */ assert (this.adder != null);
+/* 67 */ return operate(5, obj) != null;
+/* */ }
+/* */
+/* */ public VectorProperty setAdder(PropAdder adder)
+/* */ {
+/* 72 */ this.adder = adder;
+/* 73 */ return this;
+/* */ }
+/* */
+/* */ public PropAdder getAdder()
+/* */ {
+/* 78 */ return this.adder;
+/* */ }
+/* */
+/* */ public void allowSorting(boolean allow)
+/* */ {
+/* 83 */ this.allowSorting = allow;
+/* */ }
+/* */
+/* */ public boolean shouldSort()
+/* */ {
+/* 88 */ return this.allowSorting;
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VectorProperty.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file