@Override public synchronized boolean add(Long aLong) { version++; return map.put(aLong.intValue(), TRUE); }
/** * Add a filter and assign it the given unique ID */ public void addFilter(Filter filter, int ID) { if (ID < 0) { throw new IllegalArgumentException("ID must be greater than 0"); } if (ID2Filter.containsKey(ID)) { throw new IllegalArgumentException("ID map already contains that ID"); } ID2Filter.put(ID, filter); Filter2ID.put(filter, new Integer(ID)); filterList.add(filter); //System.out.println( "Filter list added: "+filter ); filter.getSwingPropertyChangeSupport().addPropertyChangeListener(this); notifyListeners(new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, filterList.size(), filterList.size())); fireFilterEvent(); }
private void addVarNamePair(int varName1, long key) { LongArrayList pairs = (LongArrayList) varNameToPairsIndex.get(varName1); if (pairs == null) { pairs = new LongArrayList(new long[]{ key }); varNameToPairsIndex.put(varName1, pairs); } else { pairs.add(key); } } });
private void addTiersHash1(ITier tier, int varName) { int key = varName; // List of ITier ObjectArrayList tiers = (ObjectArrayList) tiersHash1.get(key); if (tiers == null) { tiersHash1.put(key, new ObjectArrayList(new ITier[] {tier})); } else { tiers.add(tier); } }
public void release(int key, Object object) { ObjectArrayList objects = (ObjectArrayList) map.get(key); if (objects == null) { objects = new ObjectArrayList(); map.put(key, objects); } objects.add(object); count++; if (count > maxCount) { maxCount = count; } } }
public StructuresForConcordantShift(int hssSize) { substructureEdges = new ObjectArrayList(hssSize); hsIntersections = new OpenIntObjectHashMap(hssSize); coincidentIntersections = new ObjectArrayList(hssSize); for (int h = 0; h < hssSize; h++) { hsIntersections.put(h, new ObjectArrayList(8)); } } public void clear()
public WalkState getNodeAsState(WalkNodeEntry node) { WalkState state = (WalkState) _nodeMapping.get(node.getId()); if (state == null) { state = new AtNodeWalkState(node); _nodeMapping.put(node.getId(), state); } return state; }
if (bottom2empty) vertex.foundEmptyEdge(EdgeKind.Bottom2); tier.put(tripletValue.getTierKey(), vertex);
/** * DOCUMENT ME! * * @param node_index DOCUMENT ME! * @param att_id DOCUMENT ME! * @param value DOCUMENT ME! * * @return DOCUMENT ME! */ public static int setNodeAttributeObjectValue(int node_index, int att_id, Object value) { // return if higher than the number of attributes if (att_id > nodeAttributeCount) return INSANE_ATTRIBUTE_ID; // make sure that the attribute type is correct if (getNodeAttIDToAttTypeMap().get(att_id) != OBJECT_TYPE) return WRONG_ATTRIBUTE_TYPE; OpenIntObjectHashMap object_map = (OpenIntObjectHashMap) getNodeAttributeIDToAttributeValuesMap() .get(att_id); object_map.put(node_index, value); return 1; }
int newCapacity = chooseGrowCapacity(this.distinct+1,this.minLoadFactor, this.maxLoadFactor); rehash(newCapacity); return put(key, value);
int newCapacity = chooseGrowCapacity(this.distinct+1,this.minLoadFactor, this.maxLoadFactor); rehash(newCapacity); return put(key, value);
int newCapacity = chooseGrowCapacity(this.distinct + 1, this.minLoadFactor, this.maxLoadFactor); rehash(newCapacity); return put(key, value);
public void addVertex(int tierSize, IVertex vertex) { int tierIndex = vertex.getTierIndex(); OpenIntObjectHashMap edges; if (tierIndex == tiers.size()) { edges = new OpenIntObjectHashMap(tierSize); tiers.add(edges); } else { edges = (OpenIntObjectHashMap) tiers.get(tierIndex); } edges.put(vertex.getTripletValue().getTierKey(), vertex); ((SimpleVertex)vertex).setHyperStructure(this); } }
private static void fillVerticesFromLastTier(ObjectArrayList hss, ObjectArrayList structures, OpenIntObjectHashMap verticesFromLastTiers) { IHyperStructure basicGraph = (IHyperStructure) hss.get(0); int tiersCount = basicGraph.getTiers().size(); // Pick any vertex from the last tier of each HS (with the same index for each HS) for(int h = 0; h < hss.size(); h++) { IHyperStructure hs = (IHyperStructure) hss.get(h); IVertex vertexFromTheLastTier = (IVertex) ((OpenIntObjectHashMap) hs.getTiers().get(tiersCount - 1)).values().get(0); verticesFromLastTiers.put(h, vertexFromTheLastTier); ICompactTripletsStructure structure = ((IVertex) verticesFromLastTiers.get(h)).getCTS(); structures.add(structure); } }
indexCache.put(cacheKey, index);
OpenIntObjectHashMap nextTier = (OpenIntObjectHashMap) hs.getTiers().get(j2); ObjectArrayList intersections = new ObjectArrayList(); hsIntersections.put(h, intersections); for (int s = 0; s < nextTier.size(); s++)