From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/scape/VectorProperty.java | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 NET/worlds/scape/VectorProperty.java (limited to 'NET/worlds/scape/VectorProperty.java') 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 toVector(Object[] arr) +/* */ { +/* 33 */ Vector 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 toVector(Hashtable hash) +/* */ { +/* 41 */ Vector v = new Vector(hash.size()); +/* */ +/* 43 */ Enumeration 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 -- cgit v1.2.3