1 package net.sf.saxon.instruct; 2 3 import java.io.Serializable ; 4 import java.util.List ; 5 import java.util.ArrayList ; 6 7 8 18 19 public class SlotManager implements Serializable { 20 21 private ArrayList variableMap = new ArrayList (10); 22 private int numberOfVariables = 0; 23 24 28 29 public SlotManager(){} 30 31 34 35 public int getNumberOfVariables() { 36 return numberOfVariables; 37 } 38 39 43 44 public void setNumberOfVariables(int numberOfVariables) { 45 this.numberOfVariables = numberOfVariables; 46 variableMap.trimToSize(); 47 } 48 49 52 53 public int allocateSlotNumber(int fingerprint) { 54 variableMap.add(new Integer (fingerprint)); 55 return numberOfVariables++; 56 } 57 58 62 63 public List getVariableMap() { 64 return variableMap; 65 } 66 67 } 68 69 | Popular Tags |