/* */ package NET.worlds.network; /* */ /* */ import java.io.IOException; /* */ import java.util.Vector; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class OldPropertyList /* */ { /* */ private Vector _propList; /* */ /* */ public OldPropertyList() /* */ { /* 25 */ this._propList = new Vector(); /* */ } /* */ /* */ public void addProperty(netProperty prop) { /* 29 */ assert (getProperty(prop.property()) == null); /* 30 */ this._propList.addElement(prop); /* */ } /* */ /* */ public int size() { /* 34 */ return this._propList.size(); /* */ } /* */ /* */ public final netProperty elementAt(int i) { /* 38 */ return (netProperty)this._propList.elementAt(i); /* */ } /* */ /* */ public netProperty getProperty(int propID) { /* 42 */ for (int i = this._propList.size() - 1; i >= 0; i--) { /* 43 */ if (elementAt(i).property() == propID) /* 44 */ return elementAt(i); /* */ } /* 46 */ return null; /* */ } /* */ /* */ /* */ /* */ void parseNetData(ServerInputStream data) /* */ throws IOException /* */ { /* 54 */ this._propList = new Vector(); /* 55 */ while (!data.isEmpty()) { /* 56 */ netProperty tmpProp = new netProperty(); /* 57 */ tmpProp.parseNetData(data); /* 58 */ this._propList.addElement(tmpProp); /* */ } /* */ } /* */ /* */ int packetSize() { /* 63 */ int len = 0; /* */ /* 65 */ for (int i = this._propList.size() - 1; i >= 0; i--) { /* 66 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i); /* 67 */ len += tmpProp.packetSize(); /* */ } /* 69 */ return len; /* */ } /* */ /* */ void send(ServerOutputStream o) throws IOException { /* 73 */ int maxidx = this._propList.size(); /* */ /* 75 */ for (int i = 0; i < maxidx; i++) { /* 76 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i); /* 77 */ tmpProp.send(o); /* */ } /* */ } /* */ /* */ public String toString() /* */ { /* 83 */ String out = "("; /* 84 */ int maxidx = this._propList.size(); /* */ /* 86 */ for (int i = 0; i < maxidx; i++) { /* 87 */ netProperty tmpProp = (netProperty)this._propList.elementAt(i); /* 88 */ out = out + tmpProp + " "; /* */ } /* 90 */ out = out + ")"; /* 91 */ return out; /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\OldPropertyList.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */