Can you choose methods depending on your constructor input?

I'd like to be able to impliment certain method sets, depending on constructor imput. Is there any such thing in java that lets you build a class' methods dynamically...or at least kill/switch/create methods after it's instantiated?
thanks for any insight :)

That's a vague statement, but it sounds like you want to write a factory method that instantiates different classes depending on the parameter values:
public Runnable createRunner(X y, Y y, Z z) {
    if  (...)
        return new Jogger(...);
    else
        return new Limper(...);
}

Similar Messages

  • Using iTunes why can you not backup and save your voicemail?  Guide me through this step by step if possible.  If alternate method MUST be used then provide same.  Truly appreciate this.

    Using iTunes why can you not backup and save your voicemail?  Guide me through this step by step if possible.  If alternate method MUST be used then provide same.  Truly appreciate this.

    Create and delete iPhone, iPad, and iPod touch backups in iTunes - Apple Support  - link doesn't state that voicemail is part of the backup
    iCloud: iCloud storage and backup overview  states that VVM is part of the icloud backup.
    You can also contact your cell phone provider - as voicemail is a carrier feature.

  • Can you choose email address for autofill?

    Hi all,
    Searched and could not find an answer.
    Can you choose which email address you would like to autofill when completing a form (that is when you have more than one email address in your address card)?
    Thank you.
    S

    Hello:
    I looked as well and could find nothing specific.  I suspect it picks the first one with no other options, but since I have only one, I cannot say for sure.
    Barry

  • Can you put a DVD in your MacBook Pro and watch it on Apple TV?

    Can you put a DVD in your MacBook Pro and watch it on Apple TV?

    You can use AirPlay to display your MacBook screen on the Apple TV, but that depends on your MacBook - About AirPlay Mirroring in OS X Mountain Lion

  • Can you gifting an app with your account balance

    Can you gifting an app with your account balance

    I think this is idiotic. I know MANY ppl who have to constantly change their passwords because their accounts have been compromised once and these ppl only use gift cards to put credit on their accounts. Why is it that ppl who dont have a credit card or want that information kept on file are being kept from gifting. If someone chooses to pay by CC then no prob but if Im not able because I dont have a CC or want Apple to store my CC information then Im screwed?? Isnt it illegal for a company to store CC information anyway?

  • HT202213 can you setup home sharing from your iPad ?

    can you setup home sharing from your iPad ?

    You can set Home sharing on the iPad by adding your Apple ID in the appropriate area.
    Settings->Music->Home Sharing
    But you still need a computer with iTunes from which to share the library.  You can't share libraries between iDevices.

  • Can you connect a ps3 to your Mac using apple tv?

    Can you connect a ps3 to your Mac using apple tv?

    24r wrote:
    Can you connect a ps3 to your Mac using apple tv?
    I'm not quite sure what you mean by this - do you mena connect to the Mac to access streaming media or perhaps you were wondering if the AppleTV can behave as a wireless extender to give network access to the PS3 - it can't.
    If you are looking for media server solutions there are several available that run on Mac, some free some commercial.
    Free include:
    http://en.wikipedia.org/wiki/PS3MediaServer

  • HT204387 can you listen to music with your ipod touch 4g and a bluetooth handsfree device

    can you listen to music with your ipod touch 4g and a bluetooth handsfree device

    Yes if the BT device supports the profiles supported by the iPod. See:
    iOS: Supported Bluetooth profiles
    The A2DP provide is used with speaker and headphones
    The Hands Free profiles (HFP) is typically used with headset (headphones and mic).

  • Can you rewind while viewing using your Apple TV remote?

    Can you rewind while viewing using your Apple TV remote?

    I thought I tried that but I will look at it again. Do you mean the one on the wheel on top?

  • HT4061 Can you download a movie to your ipad if you don't have it with you?

    Can you download a movie to your ipad if you don't have it physically with you. I'm going out of town tomorrow and want to download a movie now, but my Ipad is at home.

    No you cannot.

  • How can you find out what generation your iPod touch is?

    How can you find out what generation your iPod touch is?

    Hi,
    Here is help for the operating system:
    If you are locked to iOS 3 then you have an iPod Touch 1st Gen.
    If you are locked to iOS 4 then you have an iPod Touch 2nd Gen.
    If you are locked to iOS 5 then you have an iPod Touch 3rd Gen.
    If you are locked to iOS 6 then you have an iPod Touch 4th Gen.
    If you can get iOS 7 and have an iPhone 5 sized screen [bigger] you have the current iPod Touch 5th Gen.
    I assume since it says you have iOS 5.1.1 you have an iPod Touch 3rd Gen.
    Also, you may want to sync it so iTunes can tell you or you can look at the model number on the back.
    Hope this helped.

  • When you make a Apple ID how can you choose none for credit card type

    When you make a Apple ID how can you choose none for credit card type

    You need to follow the instructions on this page when creating a new account : http://support.apple.com/kb/HT2534 - otherwise you won't get the 'none' option and you will need to enter credit card details before you will be able to use the account in the store

  • If you rent a movie through iTunes can you watch the movie on your iPad if you are not connected to internet or 3g

    If you rent a movie through iTunes, can you watch the movie on your iPad if you not in an area that does not have wifi or 3G access?  Such as on an airplane, etc...

    Yes - as long as the movie has totally and fully downloaded onto the iPad.

  • Can you have multiple users for your ipad

    can you have multiple users on your iPad

    We do. We each sign in our out with our own Apple ID's and we can share the same iPad that way.

  • HT204088 Can you view purchase history on your iPhone?

    Can you view purchase history on your iPhone?

    You can view your recent purchase history, and optionally contact iTunes Support about a problem with one of them, via this page (it doesn't show purchase numbers, but does list the items and their prices) : http://reportaproblem.apple.com

Maybe you are looking for

  • How can I open a url in oracle form 9i without toolbar and menubar

    I want to create a button in my form. When I click on the button it should open url without toolbar and menubar. I tried with web.show_document. but I am not able to remove the toolbar and menubar. plus not able to specify width and height. Any way t

  • 2 monitors+1 video projector: do i need 2 graphic cards?

    I m about to buy a new graphic card for my G5: i d like to use 2 monitors (extended desk) + 1 video projector: - has anybody successfully done that with their PowerPC G5 and did it actually work? - do i really need 2 graphic cards? Which card(s) shou

  • Vendor balance carry forward

    Hi all Could any one please help in finding out table for vendor balance carry forward , say in case of GL i have FAGLFLEXT the same kind of table for Vendor as well Ravindra kumar

  • PTG and Jakarta Tomcat 3.2

    Hello! Has anyone tried to get PTG up and running with Jakarta Tomcat 3.2? I am thinking of giving this a try and would appreciate input from everybody who has experience with the combination. Thanks! Stephan.

  • HTTPS with Applet over Proxy Issue

    An applet using HttpURLConnection within a Java Applet. The Connection is formulated as follows: HttpURLConnection urlConn = (HttpURLConnection)destURL                          .openConnection( ); urlConn.setDoOutput( true ); urlConn.setDoInput( true