register a transform function for from type -* to type

@param from class of from type
@param to   class of to type
@param transform transform function
@param <T>  from type
@param <R>  to type
436213
public static <T,R> void register(Class<T> from, Class<R> to, Function<T,R> transform) {
        REGISTRY.register(from, to, transform);
    }
778722
@Override
	protected void doTransform(Size<T> transformable, float comp)
	{
		int fromWidth = reversed ? this.toWidth : this.fromWidth;
		int toWidth = reversed ? this.fromWidth : this.toWidth;
		int fromHeight = reversed ? this.toHeight : this.fromHeight;
		int toHeight = reversed ? this.fromHeight : this.toHeight;

		transformable.setSize((int) (fromWidth + (toWidth - fromWidth) * comp), (int) (fromHeight + (toHeight - fromHeight) * comp));
	}
841227
public Object transform( int to, Object input, Map<String, Object> context ) {
        return transform( 0, to, input, context );
    }
858831
public void setTransform(Matrix newTransform) {
    FLog.v(TAG, "setTransform");
    mActiveTransform.set(newTransform);
    onTransformChanged();
  }
1370738
function TransformIterator(iterator, transform) {
    this.iterator = Iterator.isIterator(iterator) ? iterator : null;
    this.transform = isFunction(transform) ? transform : TransformIterator.IDENTITY;
    this.reset();
}
847313
private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
		if (to.equals(from))
			return true;

		if (from instanceof TypeVariable) {
			return to.equals(typeMap.get(((TypeVariable<?>) from).getName()));
		}

		return false;
	}
564071
public void replace(T from, T to) throws IOException {
        List<T> copy = new ArrayList<>(data.getView());
        for (int i=0; i<copy.size(); i++) {
            if (copy.get(i).equals(from))
                copy.set(i,to);
        }
        data.replaceBy(copy);
    }
787165
static public function registerTransformation(iTransformation $transformation) {
        self::$transformations[$transformation->getName()] = get_class($transformation);

        print_r(self::$transformations);
    }
730530
function transform(transform, flush) {
  const stream = new Transform({ objectMode: true });
  stream._transform = transform;
  if (typeof flush === 'function') {
    stream._flush = flush;
  }
  return stream;
}
790351
function CommittingEventTransformer (meta, transformFn) {
  Definition.call(this, meta);

  meta = meta || {};

  if (transformFn && !_.isFunction(transformFn)) {
    var err = new Error('Transform function not injected!');
    debug(err);
    throw err;
  }

  this.version = meta.version;

  this.transformFn = transformFn;
}
543360
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	protected void doTransform(ITransformable transformable, float comp)
	{
		if (listTransformations.size() == 0)
			return;

		for (Transformation transformation : listTransformations)
			transformation.transform(transformable, elapsedTimeCurrentLoop);
	}
362030
@Override
    public byte[] transform(ClassLoader loader,
                            String className,
                            Class<?> classBeingRedefined,
                            ProtectionDomain protectionDomain,
                            byte[] classfileBuffer) throws IllegalClassFormatException {
     	if (detailedTransformTrace && tc.isEntryEnabled())
            Tr.entry(this, tc, "transform", loader, className, classBeingRedefined, protectionDomain);

		    	
		if (!isJava8TraceEnabled)
			return null; //Look for special trace instrumentation force until JDK bug fully fixed.
		
		if (classBeingRedefined != null)
        	return null;

        byte[] newClassBytes = null;
        if (isTransformPossible(classfileBuffer)) {
            try {
                newClassBytes = transform(classfileBuffer);
            } catch (Throwable t) {
                Tr.error(tc, "INSTRUMENTATION_TRANSFORM_FAILED_FOR_CLASS_2", className, t);
            }
        }

        if (detailedTransformTrace && tc.isEntryEnabled())
            Tr.exit(this, tc, "transform", newClassBytes);
        return newClassBytes;
    }
447577
@CheckResult
    @NonNull
    public final <O> Data<O> transform(@NonNull Function<? super T, ? extends O> function) {
        return new TransformData<>(this, function);
    }
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
352997
private Collection<Integer> transform(StreamTransformation<?> transform) {

		if (alreadyTransformed.containsKey(transform)) {
			return alreadyTransformed.get(transform);
		}

		LOG.debug("Transforming " + transform);

		if (transform.getMaxParallelism() <= 0) {

			// if the max parallelism hasn't been set, then first use the job wide max parallelism
			// from the ExecutionConfig.
			int globalMaxParallelismFromConfig = env.getConfig().getMaxParallelism();
			if (globalMaxParallelismFromConfig > 0) {
				transform.setMaxParallelism(globalMaxParallelismFromConfig);
			}
		}

		// call at least once to trigger exceptions about MissingTypeInfo
		transform.getOutputType();

		Collection<Integer> transformedIds;
		if (transform instanceof OneInputTransformation<?, ?>) {
			transformedIds = transformOneInputTransform((OneInputTransformation<?, ?>) transform);
		} else if (transform instanceof TwoInputTransformation<?, ?, ?>) {
			transformedIds = transformTwoInputTransform((TwoInputTransformation<?, ?, ?>) transform);
		} else if (transform instanceof SourceTransformation<?>) {
			transformedIds = transformSource((SourceTransformation<?>) transform);
		} else if (transform instanceof SinkTransformation<?>) {
			transformedIds = transformSink((SinkTransformation<?>) transform);
		} else if (transform instanceof UnionTransformation<?>) {
			transformedIds = transformUnion((UnionTransformation<?>) transform);
		} else if (transform instanceof SplitTransformation<?>) {
			transformedIds = transformSplit((SplitTransformation<?>) transform);
		} else if (transform instanceof SelectTransformation<?>) {
			transformedIds = transformSelect((SelectTransformation<?>) transform);
		} else if (transform instanceof FeedbackTransformation<?>) {
			transformedIds = transformFeedback((FeedbackTransformation<?>) transform);
		} else if (transform instanceof CoFeedbackTransformation<?>) {
			transformedIds = transformCoFeedback((CoFeedbackTransformation<?>) transform);
		} else if (transform instanceof PartitionTransformation<?>) {
			transformedIds = transformPartition((PartitionTransformation<?>) transform);
		} else if (transform instanceof SideOutputTransformation<?>) {
			transformedIds = transformSideOutput((SideOutputTransformation<?>) transform);
		} else {
			throw new IllegalStateException("Unknown transformation: " + transform);
		}

		// need this check because the iterate transformation adds itself before
		// transforming the feedback edges
		if (!alreadyTransformed.containsKey(transform)) {
			alreadyTransformed.put(transform, transformedIds);
		}

		if (transform.getBufferTimeout() >= 0) {
			streamGraph.setBufferTimeout(transform.getId(), transform.getBufferTimeout());
		}
		if (transform.getUid() != null) {
			streamGraph.setTransformationUID(transform.getId(), transform.getUid());
		}
		if (transform.getUserProvidedNodeHash() != null) {
			streamGraph.setTransformationUserHash(transform.getId(), transform.getUserProvidedNodeHash());
		}

		if (!streamGraph.getExecutionConfig().hasAutoGeneratedUIDsEnabled()) {
			if (transform.getUserProvidedNodeHash() == null && transform.getUid() == null) {
				throw new IllegalStateException("Auto generated UIDs have been disabled " +
					"but no UID or hash has been assigned to operator " + transform.getName());
			}
		}

		if (transform.getMinResources() != null && transform.getPreferredResources() != null) {
			streamGraph.setResources(transform.getId(), transform.getMinResources(), transform.getPreferredResources());
		}

		return transformedIds;
	}
305806
public static <T> T convert(Object from, Class<? extends T> to, Params arg) {
        if (from == null) {
            throw new NullPointerException("from");
        }
        if (to == null) {
            throw new NullPointerException("to");
        }
        if (from.getClass() == String.class && to.isArray()) {
            return new ArrayConverter((String) from).getArrayForType(to);
        }
        // get it from the internal cache.
        @SuppressWarnings("unchecked")
        Converter<Object, T> c = co.get(key(from.getClass(), to));
        if (c == null) {
            // service provider lookup
            c = lookupConversionService(from.getClass(), to);
            if (c == null) {
                throw new ComponentException("No Converter: " + from + " (" + from.getClass() + ") -> " + to);
            }
            co.put(key(from.getClass(), to), c);
        }
        Object param = null;
        if (arg != null) {
            param = arg.get(from.getClass(), to);
        }
        return (T) c.convert(from, param);
    }
100126
public static void register(String from, String to) {
        LayoutInflater.sRemaps.put(from, to);
    }