|
Okay, that makes sense. I generally try to do that anyway, as far asreturn
the interface.for
What I don't understand is how you could get around getters and setters
something like an int. The only production coding I've done in Java is anMy interpretation of the article was that instead of assuming e.g. "custom
order entry process.
number" is an int, and then storing it as an int throughout your code, you
define e.g.:
public class CustomerNumber extends Integer
{
}
public class Customer
{
public CustomerNumber getCustomerNumber ()
{
}
public void setCustomerNumber (CustomerNumber newNumber)
{
}
}
that way if you always refer to it via the CustomerNumber type, you could
change CustomerNumber to extend from Long or any other class as appropriate
and only need to change it one place. I've never done this in practice but
I can see it makes some amount of sense.
(Yes I realise Integer is final and so you can't extend it... perhaps just
have a public int field inside the CustomerNumber class?)
Nigel Gay,
Computer Patent Annuities.
********************************************************************************
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.
If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.
********************************************************************************
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
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.