/** * Creates a new <code>THashSet</code> instance containing the * elements of <tt>collection</tt>. * * @param collection a <code>Collection</code> value */ public THashSet(Collection<? extends E> collection) { this(collection.size()); addAll(collection); }
private void merge(int pos, int id) { THashSet<String> posSet = hashlist.get(pos); THashSet<String> idSet = clusterHashList.get(id); idSet.addAll(posSet); ArrayList<String> list = clusterResult.get(id); list.add(word.get(pos)); }
private void initclusterResult(int size) { for (int i = 0; i < size; i++) { ArrayList<String> list = new ArrayList<String>(); list.add(word.get(i)); clusterResult.add(list); THashSet<String> thashset = new THashSet<String>(); thashset.addAll(hashlist.get(i)); clusterHashList.add(thashset); } }
/** * 读词性的字典 * @param path * @param suffix * @throws IOException */ public void readPOSDICT(String path, String suffix) throws IOException { DictPOS dp = new DictPOS(); dp.loadPath(path,suffix); set.addAll(dp.dict.keySet()); } /**
continue; System.out.println(sset); tempdict.addAll(sset); if(!sset.contains(s)&&!nodict.contains(s)){ nodict.add(s);
@Override public boolean addAll(Collection<? extends E> collection) { return delegate.addAll(collection); }
@Override public boolean addAll(Collection<? extends E> collection) { return delegate.addAll(collection); }
/** * Creates a new <code>THashSet</code> instance containing the * elements of <tt>collection</tt>. * * @param collection a <code>Collection</code> value */ public THashSet(Collection<? extends E> collection) { this(collection.size()); addAll(collection); }
/** * Creates a new <code>THashSet</code> instance containing the * elements of <tt>collection</tt>. * * @param collection a <code>Collection</code> value */ public THashSet(Collection<? extends E> collection) { this(collection.size()); addAll(collection); }
/** * Creates a new <code>THashSet</code> instance containing the * elements of <tt>collection</tt>. * * @param collection a <code>Collection</code> value */ public THashSet(Collection<? extends E> collection) { this(collection.size()); addAll(collection); }
/** * Creates a new <code>THashSet</code> instance containing the * elements of <tt>collection</tt>. * * @param collection a <code>Collection</code> value */ public THashSet( Collection<? extends E> collection ) { this( collection.size() ); addAll( collection ); }
THashSet<String> calculateCommonLeafes(TreePair pair) { THashSet<String> ts1 = treeToTaxa.get(pair.t1); THashSet<String> ts2 = treeToTaxa.get(pair.t2); if (ts1 == null) { ts1 = createTreeEntry(pair.t1); } if (ts2 == null) { ts2 = createTreeEntry(pair.t2); } THashSet<String> tcommon = new THashSet<>(ts1.size()); tcommon.addAll(ts1); tcommon.retainAll(ts2); return tcommon; }
public ItemAxeFlux(ToolMaterial toolMaterial) { super(-2.8F, toolMaterial); addToolClass("axe"); damage = 7; damageCharged = 6; energyPerUseCharged = 1600; effectiveBlocks.addAll(ItemAxe.EFFECTIVE_ON); effectiveMaterials.add(Material.WOOD); effectiveMaterials.add(Material.PLANTS); effectiveMaterials.add(Material.VINE); effectiveMaterials.add(Material.CACTUS); effectiveMaterials.add(Material.GOURD); }
public ItemShovelCore(ToolMaterial toolMaterial) { super(1.0F, -3.0F, toolMaterial); addToolClass("shovel"); effectiveBlocks.addAll(ItemSpade.EFFECTIVE_ON); effectiveMaterials.add(Material.GROUND); effectiveMaterials.add(Material.GRASS); effectiveMaterials.add(Material.SAND); effectiveMaterials.add(Material.SNOW); effectiveMaterials.add(Material.CRAFTED_SNOW); effectiveMaterials.add(Material.CLAY); }
public ItemAxeCore(ToolMaterial toolMaterial) { super(3.0F, -3.2F, toolMaterial); addToolClass("axe"); effectiveBlocks.addAll(ItemAxe.EFFECTIVE_ON); effectiveMaterials.add(Material.WOOD); effectiveMaterials.add(Material.PLANTS); effectiveMaterials.add(Material.VINE); effectiveMaterials.add(Material.CACTUS); effectiveMaterials.add(Material.GOURD); if (harvestLevel > 0) { attackDamage = 8.0F; attackSpeed = -3.3F + (0.1F * harvestLevel); } else { attackDamage = 6.0F; attackSpeed = -3.2F + (0.1F * (int) (efficiency / 5)); } }
public ItemShovelFlux(ToolMaterial toolMaterial) { super(-3.0F, toolMaterial); addToolClass("shovel"); damage = 4; energyPerUseCharged = 800; effectiveBlocks.addAll(ItemSpade.EFFECTIVE_ON); effectiveMaterials.add(Material.GROUND); effectiveMaterials.add(Material.GRASS); effectiveMaterials.add(Material.SAND); effectiveMaterials.add(Material.SNOW); effectiveMaterials.add(Material.CRAFTED_SNOW); effectiveMaterials.add(Material.CLAY); }
public ItemPickaxeCore(ToolMaterial toolMaterial) { super(2.0F, -2.8F, toolMaterial); addToolClass("pickaxe"); effectiveBlocks.addAll(ItemPickaxe.EFFECTIVE_ON); effectiveMaterials.add(Material.IRON); effectiveMaterials.add(Material.ANVIL); effectiveMaterials.add(Material.ROCK); effectiveMaterials.add(Material.ICE); effectiveMaterials.add(Material.PACKED_ICE); effectiveMaterials.add(Material.GLASS); effectiveMaterials.add(Material.REDSTONE_LIGHT); }
public ItemExcavatorFlux(ToolMaterial toolMaterial) { super(-3.0F, toolMaterial); addToolClass("shovel"); addToolClass("excavator"); damage = 4; energyPerUseCharged = 1600; effectiveBlocks.addAll(ItemSpade.EFFECTIVE_ON); effectiveMaterials.add(Material.GROUND); effectiveMaterials.add(Material.GRASS); effectiveMaterials.add(Material.SAND); effectiveMaterials.add(Material.SNOW); effectiveMaterials.add(Material.CRAFTED_SNOW); effectiveMaterials.add(Material.CLAY); }
public ItemExcavatorCore(ToolMaterial toolMaterial) { super(1.0F, -3.0F, toolMaterial); addToolClass("shovel"); addToolClass("excavator"); setMaxDamage(toolMaterial.getMaxUses() * 2); effectiveBlocks.addAll(ItemSpade.EFFECTIVE_ON); effectiveMaterials.add(Material.GROUND); effectiveMaterials.add(Material.GRASS); effectiveMaterials.add(Material.SAND); effectiveMaterials.add(Material.SNOW); effectiveMaterials.add(Material.CRAFTED_SNOW); effectiveMaterials.add(Material.CLAY); }
public ItemHammerFlux(ToolMaterial toolMaterial) { super(-3.2F, toolMaterial); addToolClass("pickaxe"); addToolClass("hammer"); damage = 9; damageCharged = 6; energyPerUseCharged = 1600; effectiveBlocks.addAll(ItemPickaxe.EFFECTIVE_ON); effectiveMaterials.add(Material.IRON); effectiveMaterials.add(Material.ANVIL); effectiveMaterials.add(Material.ROCK); effectiveMaterials.add(Material.ICE); effectiveMaterials.add(Material.PACKED_ICE); effectiveMaterials.add(Material.GLASS); effectiveMaterials.add(Material.REDSTONE_LIGHT); }