On 4/2/07, Jim D wrote:
....
> but I don't know how to do
> that.  How do one object return another?

Here is a simple example (I can explain it, at least.)

import org.apache.log4j.jdbcplus.JDBCIDHandler;
/**
 * Implement a sample JDBCIDHandler
 *
 * @author
 * <a href="mailto:[EMAIL PROTECTED]">Thomas Fenner</a>
 * @since 1.0
 * @version see jdbcappender.jar/META-INF/MANIFEST.MF for version information
 */
public class MyIDHandler implements JDBCIDHandler
{
        private static long id = 0;

        public synchronized Object getID()
   {
                return new Long(++id);
   }
}

Well, I can see what's going on.  Explaining might not be
my forte. :-)  Good example nonetheless.
(I could probably answer a question or two about it.)

> 3) Something else?  Something gooder?
>
> Obviously I'd like the objects representing the alphabets to be as small and
> simple as possible - you should be able to add new alphabets easily without
> touching any of the other code.

I would lean toward the alphabets being data files (some simple format
would do fine, or XML and all that fancy good to know stuff... ;), which
you then place in a directory that is parsed by your AlphaLoader whatnot...

So it starts up, looks for some alphabets, and loads them using the loader.

Loads them by passing the data in when creating the alphabet object,
which has very simple methods like getWordForLetter('a')

> Any thoughts?  I'm looking more at this as a "right way to do it" (even if
> it's boringly dull and overkill) in Java rather than solving this specific
> problem.

Oh crap.  The right way?  I haven't a clue.  Java is pretty structured, so
I guess if you learn it good you're good.  Pssssyche!

Can't help you there, still figuring it out.  :-)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:231963
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to