/** * Returns true if we have seen this stringValue before, and it hasn't been removed. * <p> * NOTE: An answer of true does not imply that the column still contains the value, only that * it is in the dictionary map */ private boolean contains(String stringValue) { return valueToKey.containsKey(stringValue); }
/** * Create an id of the given object. * * @return the id generated for this object. */ public int createId(Object object) { assert !objectToID.containsKey(object); int id = ++highestID; objectToID.put(object, id); idToObject.put(id, object); return id; }
/** * Returns true if we have seen this stringValue before, and it hasn't been removed. * <p> * NOTE: An answer of true does not imply that the column still contains the value, only that * it is in the dictionary map */ private boolean contains(String stringValue) { return valueToKey.containsKey(stringValue); }
@Override public boolean contains(String recordId) { return map.containsKey(recordId); } }
@Override public boolean contains(K k) { return counts.containsKey(k); }
public boolean containsId(final Object id) { return dictionary.containsKey(id); }
void checkIdDoesntExist(Object id) { if (dictionary.containsKey(id)) { throw new IllegalArgumentException("The edge id already exist"); } }
private void checkIdDoesntExist(Object id) { if (dictionary.containsKey(id)) { throw new IllegalArgumentException("The node id already exist"); } }
private void checkIdDoesntExist(Object id) { if (dictionary.containsKey(id)) { throw new IllegalArgumentException("The node id already exist"); } }
void checkIdDoesntExist(Object id) { if (dictionary.containsKey(id)) { throw new IllegalArgumentException("The edge id already exist"); } }
public boolean containsId(final Object id) { checkNonNullObject(id); return dictionary.containsKey(id); }
@Override public int varIndex(String name) { if (!colReverse.containsKey(name)) { throw new IllegalArgumentException(String.format("var name: %s does not exist", name)); } return colReverse.getInt(name); }
public boolean containsId(final Object id) { checkNonNullObject(id); return dictionary.containsKey(id); }
public static boolean addFuel(String fluidName, int energy) { if (!FluidRegistry.isFluidRegistered(fluidName) || energy < 10000 || energy > 200000000) { return false; } if (fuelMap.containsKey(fluidName)) { return false; } fuelMap.put(fluidName, energy); return true; }
/** * Create an id of the given object. * @param object * @return the id generated for this object. */ public int createId(Object object) { assert !objectToID.containsKey(object); int id = ++highestID; objectToID.put(object, id); idToObject.put(id, object); return id; }
public static boolean addFuel(String fluidName, int energy) { if (!FluidRegistry.isFluidRegistered(fluidName) || energy < 10000 || energy > 200000000) { return false; } if (fuelMap.containsKey(fluidName)) { return false; } fuelMap.put(fluidName, energy); return true; }
public static boolean isValidCoolant(FluidStack stack) { return stack != null && coolantMap.containsKey(stack.getFluid().getName()); }
public static boolean isValidFuel(FluidStack stack) { return stack != null && fuelMap.containsKey(stack.getFluid().getName()); }
public static boolean isValidFuel(FluidStack stack) { return stack != null && fuelMap.containsKey(stack.getFluid().getName()); }
/** * Add a (potentially new) element to the map * @param token The element * @return The index assigned to it */ public int offer(String token) { if(super.containsKey(token)) { return super.getInt(token); } else { int w = super.size() + 1; super.put(token, w); return w; } }