Examples of copy()


Examples of org.apache.lucene.util.IntsRef.copy()

      // build all prefixes
      final Map<IntsRef,CountMinOutput<T>> prefixes = new HashMap<IntsRef,CountMinOutput<T>>();
      final IntsRef scratch = new IntsRef(10);
      for(InputOutput<T> pair: pairs) {
        scratch.copy(pair.input);
        for(int idx=0;idx<=pair.input.length;idx++) {
          scratch.length = idx;
          CountMinOutput<T> cmo = prefixes.get(scratch);
          if (cmo == null) {
            cmo = new CountMinOutput<T>();
View Full Code Here

Examples of org.apache.lucene.util.PagedBytes.copy()

      if (indexedTerms != null && (termNum & indexIntervalMask) == 0) {
        // Index this term
        sizeOfIndexedStrings += t.length;
        BytesRef indexedTerm = new BytesRef();
        indexedTermsBytes.copy(t, indexedTerm);
        // TODO: really should 1) strip off useless suffix,
        // and 2) use FST not array/PagedBytes
        indexedTerms.add(indexedTerm);
      }
View Full Code Here

Examples of org.apache.mahout.matrix.Vector.copy()

  public boolean shiftToMean() {
    Vector centroid = computeCentroid();
    converged = new EuclideanDistanceMeasure().distance(centroid, center) < convergenceDelta;
    center = centroid;
    numPoints = 1;
    pointTotal = centroid.copy();
    return converged;
  }

  @Override
  public String toString() {
View Full Code Here

Examples of org.apache.ojb.otm.copy.ObjectCopyStrategy.copy()

            Object swizzledObject = swizzlingStrategy.swizzle(userObject, null, _pb, this);
            entry = new ContextEntry(swizzledObject);
            if (entry.handler != null)
            {
                ObjectCopyStrategy copyStrategy = _tx.getKit().getCopyStrategy(oid);
                entry.cacheObject = copyStrategy.copy(userObject, _pb);
                // Assume that object exists, otherwise were the proxy came from?
                _objects.put(oid, entry);
                lockManager.ensureLock(oid, _tx, lock, _pb); // lock after _objects.put to avoid hanged locks
                entry.handler.addListener(this);
            }
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration.copy()

                    ((JDBCStoreManager) store)
                        .getCacheMapFromQuerySQLCache(RelationFieldStrategy.class);
            }
            boolean found = true;
            JDBCFetchConfiguration fetchClone = new JDBCFetchConfigurationImpl();
            fetchClone.copy(fetch);
            JDBCStoreManager.SelectKey selKey =
                new JDBCStoreManager.SelectKey(null, field, fetch);
            Object[] obj = relationFieldUnionCache.get(selKey);
            if (obj != null) {
                union = (Union) obj[0];
View Full Code Here

Examples of org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.copy()

                    ((JDBCStoreManager) store)
                        .getCacheMapFromQuerySQLCache(RelationFieldStrategy.class);
            }
            boolean found = true;
            JDBCFetchConfiguration fetchClone = new JDBCFetchConfigurationImpl();
            fetchClone.copy(fetch);
            JDBCStoreManager.SelectKey selKey =
                new JDBCStoreManager.SelectKey(null, field, fetch);
            Object[] obj = relationFieldUnionCache.get(selKey);
            if (obj != null) {
                union = (Union) obj[0];
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Column.copy()

   
    public static void getIdColumns(FieldMapping fmd, List cols) {
        Column[] pkCols =  ((ValueMappingImpl)fmd.getValue()).getColumns();
        for (int j = 0; j < pkCols.length; j++) {
            Column newCol = new Column();
            newCol.copy(pkCols[j]);
            cols.add(newCol);
        }
    }
}
View Full Code Here

Examples of org.apache.openjpa.util.Proxy.copy()

            }
            Object o = sm.fetchObject(fieldIndex);
            if (o instanceof Proxy) {
                // Get unproxied object and replace
                Proxy proxy = (Proxy) o;
                Object unproxied = proxy.copy(proxy);
                fm.storeObjectField(fieldIndex, unproxied);
                sm.replaceField(pc, fm, fieldIndex);
                fm.clear();
                // clean up old proxy
                proxy.setOwner(null, -1);
View Full Code Here

Examples of org.apache.pdfbox.util.Matrix.copy()

        textMatrix.setValue( 1, 0, c.floatValue() );
        textMatrix.setValue( 1, 1, d.floatValue() );
        textMatrix.setValue( 2, 0, e.floatValue() );
        textMatrix.setValue( 2, 1, f.floatValue() );
        context.setTextMatrix( textMatrix );
        context.setTextLineMatrix( textMatrix.copy() );
    }
}
View Full Code Here

Examples of org.apache.pig.backend.datastorage.ElementDescriptor.copy()

                if (curElem instanceof ContainerDescriptor) {
                    ContainerDescriptor dst =
                        dstName.getDataStorage().asContainer(dstName,
                                                             ((LocalPath)curElem).getPath().getName());
                      
                    curElem.copy(dst, dstConfiguration, removeSrc);
                      
                    if (removeSrc) {
                        curElem.delete();
                    }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.