Try to add the given {@link DatagramPacket}. Returns {@code true} on success,
{@code false} otherwise.
480748
boolean add(DatagramPacket packet) {
        if (count == packets.length) {
            // We already filled up to UIO_MAX_IOV messages. This is the max allowed per sendmmsg(...) call, we will
            // try again later.
            return false;
        }
        ByteBuf content = packet.content();
        int len = content.readableBytes();
        if (len == 0) {
            return true;
        }
        NativeDatagramPacket p = packets[count];
        InetSocketAddress recipient = packet.recipient();

        int offset = iovArray.count();
        if (!iovArray.add(content)) {
            // Not enough space to hold the whole content, we will try again later.
            return false;
        }
        p.init(iovArray.memoryAddress(offset), iovArray.count() - offset, recipient);

        count++;
        return true;
    }
1120678
private boolean add(int i, T type) {
        Set<T> types = edges.get(i);
        // If there weren't any edges to this vertex, then special case the
        // creation and return true.
        if (types == null) {
            types = new HashSet<T>();
            edges.put(i, types);
        }
        
        boolean b = types.add(type);
        if (b)
            size++;
        return b;
    }
1323897
public boolean add(DirectedEdge e) {
        if (e.from() == rootVertex) {
            return outEdges.add(e.to());
        }
        else if (e.to() == rootVertex) {
            return inEdges.add(e.from());
        }
        return false;
    }
367757
public boolean add(String field, List<RDFNode> result) {
        this.result.put(field, result);
        return true;
    }
287933
@Override
    public void add(IAtomContainerSet atomContainerSet) {
        for (IAtomContainer iter : atomContainerSet.atomContainers()) {
            addAtomContainer(iter);
        }
        /*
         * notifyChanged() is called by addAtomContainer()
         */
    }
1362844
private boolean addNodeIfNotAlreadyIncluded(T thisImport,
      LinkedList<T> imports, Set<T> alreadyIncludedImports) {
    if (alreadyIncludedImports.contains(thisImport)) {
      return false;
    }
    imports.add(thisImport);
    alreadyIncludedImports.add(thisImport);
    return true;
  }
819075
private boolean add(TIntObjectHashMap<BitSet> edges, int i, T type) {
        BitSet types = edges.get(i);
        // If there weren't any edges to this vertex, then special case the
        // creation and return true.
        if (types == null) {
            types = new BitSet();
            edges.put(i, types);
            types.set(index(type));
            connected.add(i);
            size++;
            return true;
        }
        // Otherwise, lookup the type's index and see if it already exists in
        // the bitset, indicating the edge does too
        int index = index(type);
        if (!types.get(index)) {
            types.set(index);
            connected.add(i);
            size++;
            return true;            
        }
        // If the type was already there, then return false because the edge
        // already exists
        return false;
    }
1266727
public boolean add(Collection<BtrpElement> elems) {
        boolean ret = false;
        for (BtrpElement el : elems) {
            ret |= add(el);
        }
        return ret;
    }
1217386
private void mergePackage(InternalKnowledgePackage pkg,
                              InternalKnowledgePackage newPkg) {
        // Merge imports
        final Map<String, ImportDeclaration> imports = pkg.getImports();
        imports.putAll(newPkg.getImports());

        String lastType = null;
        try {
            // merge globals
            if (newPkg.getGlobals() != null && newPkg.getGlobals() != Collections.EMPTY_MAP) {
                Map<String, String> globals = pkg.getGlobals();
                // Add globals
                for (final Map.Entry<String, String> entry : newPkg.getGlobals().entrySet()) {
                    final String identifier = entry.getKey();
                    final String type = entry.getValue();
                    lastType = type;
                    if (globals.containsKey(identifier) && !globals.get(identifier).equals(type)) {
                        throw new RuntimeException(pkg.getName() + " cannot be integrated");
                    } else {
                        pkg.addGlobal(identifier,
                                      this.rootClassLoader.loadClass(type));
                        // this isn't a package merge, it's adding to the rulebase, but I've put it here for convenience
                        this.globals.put(identifier,
                                         this.rootClassLoader.loadClass(type));
                    }
                }
            }
        } catch (ClassNotFoundException e) {
            throw new RuntimeException("Unable to resolve class '" + lastType + "'");
        }

        // merge the type declarations
        if (newPkg.getTypeDeclarations() != null) {
            // add type declarations
            for (TypeDeclaration type : newPkg.getTypeDeclarations().values()) {
                // @TODO should we allow overrides? only if the class is not in use.
                if (!pkg.getTypeDeclarations().containsKey(type.getTypeName())) {
                    // add to package list of type declarations
                    pkg.addTypeDeclaration(type);
                }
            }
        }

        for (final org.kie.api.definition.rule.Rule newRule : newPkg.getRules()) {
            pkg.addRule(((RuleImpl) newRule));
        }

        //Merge The Rule Flows
        if (newPkg.getRuleFlows() != null) {
            final Map flows = newPkg.getRuleFlows();
            for (Object o : flows.values()) {
                final Process flow = (Process) o;
                pkg.addProcess(flow);
            }
        }
    }
300635
@Override
    @Deprecated
    public boolean add(T t) {
        try {
            return addSync(t);
        } finally {
            if(extensions!=null) {
                fireOnChangeListeners();
            }
        }
    }
529313
public boolean add(DirectedTypedEdge<T> e) {
        if (e.from() == rootVertex) 
            return add(outEdges, e.to(), e.edgeType());
        else if (e.to() == rootVertex) 
            return add(inEdges, e.from(), e.edgeType());
        return false;
    }
2776
public synchronized boolean add(SpdData data) {
        if (data == null) {
            return false;
        } else if (members.contains(data)) {
            return false;
        } else {
            return members.add(data);
        }
    }
1047194
@Override
    public T addPackage(Package pack) throws IllegalArgumentException {
        Validate.notNull(pack, "Pack must be specified");

        return addPackage(pack.getName());
    }
418782
public synchronized PacketBuilder withDouble(final double d)
    {
        checkBuilt();
        try
        {
            dataOutputStream.writeDouble(d);
        }
        catch (final IOException e)
        {
            logger.error("Unable to add double: {} : {}", e.getClass(), e.getMessage());
        }
        return this;
    }
156818
boolean addBlock(BlockInfo b) {
    int dnIndex = b.addNode(this);
    if(dnIndex < 0)
      return false;
    // add to the head of the data-node list
    blockList = b.listInsert(blockList, this, dnIndex);
    numOfBlocks++;
    return true;
  }
827655
public boolean add(JsonArray value) {
		if (value == null) {
			stateList.add(Type.NULL);
		} else {
			stateList.add(Type.ARRAY);
		}

		return super.add(value);
	}
952928
public void addImportedPackages(String[] imports) {
        if (imports == null) { return; }

        for (String imported : imports) {
            this.mImports.add(imported);
        }
    }