1 24 package org.objectweb.jalisto.se.query.btree; 25 26 import org.objectweb.jalisto.se.impl.LogicalOid; 27 import org.objectweb.jalisto.se.impl.InFileAddress; 28 import org.objectweb.jalisto.se.impl.server.DataWrapperImpl; 29 30 import java.util.HashSet ; 31 import java.util.Set ; 32 33 public class OidCollection extends DataWrapperImpl { 34 public OidCollection() { 35 oids = new HashSet (); 36 } 37 38 public void addOid(LogicalOid floid) { 39 oids.add(floid); 40 } 41 42 public void removeOid(LogicalOid floid) { 43 oids.remove(floid); 44 } 45 46 public boolean isEmpty() { 47 return oids.isEmpty(); 48 } 49 50 public Set asSet() { 51 return new HashSet (oids); 52 } 53 54 public InFileAddress getIfa() { 55 return ifa; 56 } 57 58 public void setIfa(InFileAddress inFileAddress) { 59 this.ifa = inFileAddress; 60 } 61 62 public String toString() { 63 return "OidCollection(" + oids.size() + ")"; 64 } 65 66 public String toFullString() { 67 StringBuffer sb = new StringBuffer (); 68 sb.append("OidCollection("); 69 sb.append("size:").append(oids.size()).append(",").append(oids).append(")"); 70 return sb.toString(); 71 } 72 73 private Set oids; 74 private InFileAddress ifa; 75 } 76 | Popular Tags |