Transform.

@param from the from
@return the ticket
960172
@Transformer(from = "{urn:switchyard-quickstart-demo:helpdesk:1.0}openTicket")
    public Ticket transform(Element from) {
        Ticket ticket = new Ticket();
        ticket.setId(getElementValue(from, "id"));
        return ticket;
    }
1045161
public Object transformObject(TransformationDescription description, Object source) throws InstantiationException,
        IllegalAccessException, ClassNotFoundException {
        return transformObject(description, source, null);
    }
478573
@Pure
	public final Transform2D toTransform2D(Point2D<?, ?> startPoint, Point2D<?, ?> endPoint) {
		assert startPoint != null : AssertMessages.notNullParameter(0);
		assert endPoint != null : AssertMessages.notNullParameter(1);
		return toTransform2D(startPoint.getX(), startPoint.getY(), endPoint.getX(), endPoint.getY());
	}
35213
@Override
    public Converter getConverter(Class<?> from, Class<?> to) {
        Map<Class<?>, Converter> toMap = fromMap.get(from);
        if (toMap != null) {
            return toMap.get(to);
        } else {
            return null;
        }
    }
403245
public long ticketKeyNew() {
        Lock readerLock = context.ctxLock.readLock();
        readerLock.lock();
        try {
            return SSLContext.sessionTicketKeyNew(context.ctx);
        } finally {
            readerLock.unlock();
        }
    }
626749
@Transformer(to = "{urn:switchyard-quickstart-demo:helpdesk:1.0}openTicketResponse")
    public Element transformToElement(TicketAck ticketAck) {
        StringBuilder ackXml = new StringBuilder()
                .append("<helpdesk:openTicketResponse xmlns:helpdesk=\"urn:switchyard-quickstart-demo:helpdesk:1.0\">")
                .append("<ticketAck>").append("<id>" + ticketAck.getId() + "</id>")
                .append("<received>" + ticketAck.isReceived() + "</received>").append("</ticketAck>")
                .append("</helpdesk:openTicketResponse>");
        return toElement(ackXml.toString());
    }
1332046
public DateTime toDomain(Date from) {
        if (from == null) {
            return null;
        }
        return new DateTime(from.getTime());
    }
1178779
public static Observable<Void> mapToVoid(Observable<?> fromObservable) {
        if (fromObservable != null) {
            return fromObservable.subscribeOn(Schedulers.io())
                    .map(new RXMapper<Void>());
        } else {
            return Observable.empty();
        }
    }
74709
public static Interval evensFromTo(int from, int to)
    {
        if (from % 2 != 0)
        {
            if (from < to)
            {
                from++;
            }
            else
            {
                from--;
            }
        }
        if (to % 2 != 0)
        {
            if (to > from)
            {
                to--;
            }
            else
            {
                to++;
            }
        }
        return Interval.fromToBy(from, to, to > from ? 2 : -2);
    }
1354049
private Animation buildScaleAnimation(final double from, final double to, final boolean show) {

        return ParallelTransitionBuilder.create()
                                        .children(
                                                  ScaleTransitionBuilder.create()
                                                                        .node(node())
                                                                        .fromX(from)
                                                                        .toX(to)
                                                                        .fromY(from)
                                                                        .toY(to)
                                                                        .duration(Duration.seconds(1))
                                                                        .build(),

                                                  FadeTransitionBuilder.create()
                                                                       .node(node())
                                                                       .fromValue(show ? 0.0 : 1.0)
                                                                       .toValue(show ? 1.0 : 0.0)
                                                                       .duration(Duration.seconds(1))
                                                                       .build())
                                        .build();
    }
948951
public Shake get(String ticket) {
        String url = WxEndpoint.get("url.shake.get");
        String body = String.format("{\"ticket\":\"%s\"}", ticket);
        logger.debug("get shake info: {}", body);
        String content = wxClient.post(url, body);
        ShakeWrapper shakeWrapper = JsonMapper.nonEmptyMapper().fromJson(content, ShakeWrapper.class);
        return shakeWrapper.getData();
    }
41862
private Integer getFromParameter(Map<String, String> parameters) throws TransformationOperationException {
        return getSubStringParameter(parameters, fromParam, 0);
    }
931158
public static <E> OqlBuilder<E> from(final String from) {
    OqlBuilder<E> query = new OqlBuilder<E>();
    query.newFrom(from);
    return query;
  }
307393
function(from, to) {
        return Math.sqrt(
            Math.pow(from.clientX - to.clientX, 2) +
            Math.pow(from.clientY - to.clientY, 2)
        );
    }
1029695
public static MutableSet<Integer> toSet(int from, int to)
    {
        MutableSet<Integer> targetCollection = UnifiedSet.newSet();
        Interval.fromTo(from, to).forEach(CollectionAddProcedure.on(targetCollection));
        return targetCollection;
    }
911062
final long transform(
        int cycle,
        int yearOfCycle,
        EastAsianMonth month,
        int dayOfMonth
    ) {
        if (!this.isValid(cycle, yearOfCycle, month, dayOfMonth)) {
            throw new IllegalArgumentException("Invalid date.");
        }

        return this.firstDayOfMonth(cycle, yearOfCycle, month) + dayOfMonth - 1;
    }
348475
public static Interval fromTo(int from, int to)
    {
        if (from <= to)
        {
            return Interval.fromToBy(from, to, 1);
        }
        return Interval.fromToBy(from, to, -1);
    }