× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 10 January 2017 at 17:10, Don Brown <DBrown@xxxxxxxxxx> wrote:

For example the method getFirst in class
com.braintreegateway.ResourceCollection has the following declaration in
Eclipse:

public T getFirst()

What is the declaration in the Javadoc?
Often, a vendor will provide example code in Java that we can build
from. Can you post some working Java code? The point being that at
this stage it's hard to tell if you're fighting with RPG or Java. I
would be extremely surprised to learn that the Javadoc has getFirst()
returning java.lang.Object. By using a pure Java example, you would
know that it's not an RPG detail that's the bump in the road. Or that
it is!

Java is clever enough to automatically cast the return object to the
object specified by the type ‘T’. In this case T is
com.braintreegateway.Transaction.

This looks more like something I'd expect to see. In which case, your
RPG prototype would be an object patterned after
com.braintree.Transaction, not java.lang.Object. As Scott notes,
there really isn't a need for RPG to cast to another object type;
simply have your prototype return the expected object.
--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.