private static void nodeCopy( double[] srcKeys, Object[] srcVals, int srcBegin, double[] targetKeys, Object[] targetVals, int targetBegin, int copyLen) { System.arraycopy(srcKeys, srcBegin, targetKeys, targetBegin, copyLen); System.arraycopy(srcVals, srcBegin, targetVals, targetBegin, copyLen); }
/** * Concat arrays in one. * * @param arrays Arrays. * @return Summary array. */ public static int[] concat(int[]... arrays) { assert arrays != null; assert arrays.length > 1; int len = 0; for (int[] a : arrays) len += a.length; int[] r = Arrays.copyOf(arrays[0], len); for (int i = 1, shift = 0; i < arrays.length; i++) { shift += arrays[i - 1].length; System.arraycopy(arrays[i], 0, r, shift, arrays[i].length); } return r; }
@Override protected FilterNode any(final FilterNode node0, boolean signor) { Objects.requireNonNull(node0); if (!(node0 instanceof FilterJoinNode)) { throw new IllegalArgumentException( this + (signor ? " or " : " and ") + " a node but " + String.valueOf(node0) + "is not a " + FilterJoinNode.class.getSimpleName()); } final FilterJoinNode node = (FilterJoinNode) node0; if (this.nodes == null) { this.nodes = new FilterNode[] {node}; this.or = signor; return this; } if (or == signor || this.column == null) { FilterNode[] newsiblings = new FilterNode[nodes.length + 1]; System.arraycopy(nodes, 0, newsiblings, 0, nodes.length); newsiblings[nodes.length] = node; this.nodes = newsiblings; if (this.column == null) this.or = signor; return this; } this.nodes = new FilterNode[] {new FilterJoinNode(node), node}; this.column = null; this.express = null; this.value = null; this.joinClass = null; this.joinEntity = null; this.joinColumns = null; this.or = signor; return this; }