Hash with one key and two values

Hello,
In java can i have a hash or similar data type than can have one value and two keys?
thanks,
jd

Eh, I'd avoid arrays, personally.
The reason why is that in my experience, once you start doing things like this, you end up adding an arbitrary number of additional elements for each key. Fixed-size arrays would be a pain.
If you don't want/need to create an object that encapsulates the two values, why not just use a java.util.Collection as the value in the hash? The Collection -- say, a LinkedList (you decide) -- would hold the two values you want associated with the key.

Similar Messages

  • How to run two programs with one PC and two monitors

    Good Morning,
    I have a requirement to run a parallel loop and update the progress in two monitors with one computer.
    For ex: its a two test stage, the process and progress of the 1st stage needs to displayed in monitor1 and similarly for 2nd stage to monitor 2 with program running with one computer.Would it be possible to do that.
    Thanks in advance

    Hi Parker,
    yes, it's possible. You also have properties to set windows to specific monitors...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I want a JClient Form with one mater and two details

    Hi,
    In my JClient Form, I want to have one master view and TWO detail views. The two detail views are linked to the master view simultaniously. Can Jdeveloper do that?
    and How?
    Stephen

    Sure. Just define the VO's and the relations between them and afterwards develop some independant panels which describe the VO's. You can then place each panel on a single panel and organize them the way you want.
    However, there isn't a way to simply generate the entire deal with a single wizard. You will have to run the wizard multiple times for each of the panels you wish to create and then manually put them together.
    Hope This Helps

  • Windows server with one NIC and two IP address answers to ping with wrong address.

    Hi,
    I have Windows 2012R2 server, as a web server. It has only one NIC, and I have given it two IP addresses. 10.0.0.11 at the main Window, and under the advanced tab, I have added 10.0.0.12 as additional ip to the nic.  I have even but to
    host file a row, that states 10.0.0.11 server.domain.local.
    Now when I ping "server.domain.local" from the server itself, it gives me 10.0.0.12 as answer.
    With nslookup I can get correct address (10.0.0.11). But when I type server.domain.local to the web browser it tries to connect 10.0.0.12, which is incorrect. It should connect to 10.0.0.11 address. Could you please help me?
    Regards,
    Jouko

    Windows does not work well with two IP addresses on the same subnet.  Results are inconsistent, as you have discovered.  In general, you should never try to put two IP addresses from the same subnet onto a single Windows box.  That means either
    multiple addresses on a single NIC or on multiple NICs.
    Maybe if you tell us what you are trying to accomplish by having two addresses, we could provide better assistance.
    . : | : . : | : . tim

  • How to create a contract with one supplier and two dealers?

    Hi Gurus,
    I have a contract with a supplier (eg. Apple), but the products and services are supplied by two dealers.
    The supplier is the manufacturer and with whom the negotiation of prices is made.
    The dealers are those who make the delivery of the products and services and who the payment is done.
    How can I create a contract with these characteristics in SRM 7.0?
    I don't want to create two contracts with same products and services for two suppliers (Dealer_1 and Dealer_2).
    How can this be handled through business partner type "Vendor"?
    In "Partner" section in "Header" --> "Basic data", I can only add 1 vendor.
    The system is:
    Component software: SRM_SERVER
    Release: 700
    Level: 0008
    Support package: SAPKIBKV08
    Thanks in advance and best regards,
    Alonso Valenzuela

    Hi Wadim,
    I have a similar requirement to create order lines in an existing contract with reference using  BAPI_CUSTOMERCONTRACT_CHANGE.  The order lines get created in the contract. However, the condition types from the order line which i'm referencing are not getting referenced and are not getting added in the Contract's line after referencing.
    Did you come across any such issue ? If yes , could you suggest the solution ?
    Regards,
    Venkat.

  • Using TimeMachine with one Mac and two HDD

    Hi
    I was wondering if the following can be done with out loosing data and with out confusing TimeMachine:
    Using one mac and with time machine going back and forth between 2 external HDD ?
    in order to have 2 TimeMachine HDD (one at home and one on the move)
    Did one of you did try this ?
    If yes is it working fine ?
    Thanks for sharing your feed back
    Regards

    Hi, and welcome to the forums.
    Yes, that works fine.
    The first backup to each drive will, of course, be a full one.
    Thereafter, each backup will be an "incremental" one, of all the changes that have been made to your system since the last backup +*to that drive.+*
    Of course, if you create a file at home, run a backup, then change the file and run another backup, your "home" backup will have both versions of that file. If you then do a backup to the other drive, it will only have the new version.
    The more changes you make between drive swaps, the longer the first backup after the swap will be, since there are more changes to "catch up" with. In some cases, the volume of changes may cause Time Machine to do a "deep traversal," with a longer than usual "Calculating Changes" phase, to figure out what's changed and needs to be backed up.

  • How do I use icloud with one mac and two iphones

    I have just got an iPhone 5.
    My wife and I share a macbook pro
    My wife has an iphone 4s and uses iCloud to sync photos etc.
    I want to use iCloud too, so.....how do we use iCloud so:
    - when we each take photos on our phones they sync to our mac
    - our contacts sync (can we set preferences on our individual phones so we only get the contacts we want on our iPhones from a shared address book on the mac)
    - we have individual calendars
    Any advice much appreciated.
    Thank you.

    If you want to share the same photo stream so both your photos sync to your mac via iCloud you'll have to share the same primary iCloud account.  Set this up in Settings>iCloud on both phones using the same Apple ID, and in System Preferences>iCloud on your Mac; then turn photo Stream to On.  If you want to also using iCloud to sync with your shared Address Book on your Mac, but keep your contacts separate, you'll have to create two contact groups in Address Book on your Mac - one for each of you - and drag copies of the appropriate contacts into each group.  Then turn iCloud syncing for Contacts to on on all your devices.  To view just your own contacts you'll have to open the Contacts app on each of your phones, tap Groups, then check only your own contact group to view.  When you add contacts on either phone, you'll have to add these contacts to the appropriate groups in Address Book on your Mac as you can't manage contact groups on your phone.
    If you want to maintain your own calendars, the easiest thing to do is not to syncing your calendar with iCloud.  If you did, your calendars would be merged in iCal on your Mac and the merged calendar would appear on both phones.
    The important thing to know is that when you share an iCloud account any data you sync with the account will be merged and appear on all devices sharing the account.  This will happen with your contacts too, but since you already have a shared Address Book on your Mac, it will stay up to date as you change/add/delete contacts on your phones.  And by using contact groups you can filter your view to just your own contacts.

  • How can I set up itunes with one ipod and two laptops?

    My boyfriend gave me an ipod a few months ago and he let me set up itunes on his laptop so everything is there. now that i have my own laptop i want everything thats on his laptop on mine. The itunes part i mean. but i don't know how can anyone help me?

    Do as this article says:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    That will make your iPod the syncing computer.
    You can only have one syncing computer/iTunes library for apps. and photos. You can however, manually sync music and vides from multiple computer/library if you sync manually. See that topic of:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad

  • Magic Mouse  question. I have set this in Preferences by ticking Swipe between pages with  one finger and also Swipe between full-screen apps with two fingers,  however when I try to do the latter, the 2 finger swipe will take me only to the dashboard and

    It's a Magic Mouse question. I have set this up in Preferences by ticking Swipe between pages with one finger and also Swipe between full-screen apps with two fingers,  however when I try to do the latter, the 2 finger swipe will take me from the app that I am on to the dashboard only and not to my other open apps.
    I also find that Smart zoom only works with some apps, for instance not with Word docs or email.
    How can I correct this please?

    Just figured out it also does not work with the Mail app.

  • HT5621 When I got my new iPhone and was trying to switch everything over I accidentally set up a new icloud account with one email and had one on my old iphone with another account. Does anyone know how I can merge the two accounts?

    When I got my new iPhone and was trying to switch everything over I accidentally set up a new icloud account with one email and had one on my old iphone with another account. Does anyone know how I can merge the two accounts?

    You cannot merge Apple IDs but you can go to Settings > iCloud and 'Delete Account'.  When prompted to turn off documents and data, choose the only option which is Delete from my iPhone, but on the other prompt for Contacts, Calendars, etc you can choose 'Keep on my iPhone'  Then once the Account is Deleted form the iPhone, log back in with the correct Apple ID and choose Merge when prompted.  This will merge your data from this iPhone with that iCloud account effectively putting your devices on the same account.

  • Why my MacBook pro with Maverick, when I'm connected with internet key and connect with usb cable my HTC One the Mac restat with error?

    Why my MacBook pro with Maverick, when I'm connected with internet key and connect with usb cable my HTC One the Mac restat with error?

    Solution may be found if you search in the "More Like This" section over in the right column. 

  • Mapping scenario with one customer and many invoices

    Hi!
    I am receiving a flat file with one customer and n-invoice records. The file could look like this:
    133133222051241480320842420500089
    13317350071000010806372131000                 0015890009876543X
    13317350071000010806372131000                 0015890009876543X
    13317350071000010806372131013                 0015890009876443X
    13317350071000010806372131014                 0015890009872343X
    where the first line is customer and the rest are invoices.
    My question is: How can I get this into a structure like this:
    <Customer>
      <...>
    <Invoice>
      <...>
    <Invoice>
      <...>
    When using content conversion (Customer,1,Invoice,*) there has to be specified a key field, which is not a possibility. Do I have to create a UDF for this to get the mapping I want?
    Thanks for your answers!
    regs Ole Mugaas

    Thanks for your answers!
    As I can see from the Krawcyk blog, he is only using one node and maybe that's why he don't have to use keyField. We have also come to the conclusion that we have to use keyfield, but then we have to give the fields out own values. This is not good enough since the values are predefined. Creating a "placeholder" in each data type would not be a good answer because then our customers have to send an additional field in the file which would cause a lot of work.
    Do you know how this can be solved with the keyfield? Is it possible to create a keyField and give it a value that is already there, ex:
    Invoice.keyFieldValue = Invoicenumber (where Invoicenumber is a field specified in the DT) ?
    regards Ole

  • C# Wrapper for Berkeley Db is not ptting proper key and data values

    Hi All,
    I am using C# wrapper for Berkeley Db which is available at sourceforge.net.
    Now when i am putting an integer as key value, it returns keysize as 9,
    instead of returning 4.
    That C# Wrapper contains a serialzing class called BDBFormatter which pass all the data into DBT .
    The file created using C# Wrapper is not read as key and data values are not coming properly if i try to read the file using only C berkeley db.
    Can anybody suggest me some way to create a berkeley Db file in C#. which can be accessible by Linux C berkeley Db APIs.
    Any help will be appreciated.....
    Thanks,
    Eric Hass

    user11218092 wrote:
    Hi All,
    I am using C# wrapper for Berkeley Db which is available at sourceforge.net.
    Now when i am putting an integer as key value, it returns keysize as 9,
    instead of returning 4.
    That C# Wrapper contains a serialzing class called BDBFormatter which pass all the data into DBT .
    The file created using C# Wrapper is not read as key and data values are not coming properly if i try to read the file using only C berkeley db.
    How data is encoded is up to the programmer. There is no defined way in BDB to do that, it is application dependent.
    The BDBFormatter class is just one way of encoding C# classes and structs (which includes the ability to serialize Nulls).
    It is written with BDB in mind and has some performance advantages over the standard .NET serialization classes.
    If you want to read back the data from code written in another language, you will have to duplicate how data is encoded/decoded.
    The source code is there to read. ;-)
    Karl

  • How can i remove a key and its value from properties file

    hi all,
    i want remove a particular key and associated value from the
    properties file. is their any standard way of doing?
    thanks inadvance
    daya

    hi,
    thanks
    i am able to remove the key,
    one more question how can avoid storing date and time
    in properties file.
    thanks
    daya

  • Master data records with one key

    Hello All,
    I have scenario that I need to load the master data records with one key.
    For ex--
    Cluster            Dcode               version
    5000                 DC1                  2008
    5000                 DC1                  2008
    5001                  DC1                  2009
    Could you please let me know possible ways.
    Thanks

    In your case if Cluster is the key then the underlying attributes data will be overwritten when the same cluster key comes.
    as per you example data finally it loads only two records in to the target, since first two records key is same.
    Hope this helps.
    Veerendra.

Maybe you are looking for

  • IPhone/Mac/Mobile Me Sync issue - Contacts / Calendar

    I seem to have lost all of my contacts and birthdays after syncing my iphone, mobileme and my mac. The only location which still has contacts is my iphone. Since contacts went missing, all of my birthday settings in my calendar are also gone...Any th

  • Need to turn off IDS normalization engine.

    Hi all. I would like to know how can we turn off cisco ids nomalization engine? Is it complicated one or not? We have some issue when we enable cisco nomalization engine on ids which is inline mode. some of assymetric traffic will be dropped. So, we

  • Newbie: Airport Express, DSL internet, G4 iBook, and me

    Hello everyone! I have just purchased an Airport Express (with AirTunes), to connect to the internet wirelessly. I have the latest generation g4 iBook (before they switched to the new MacBook models), and so it came installed with an Airport card, so

  • Billing error: "Division" information missing

    Hi gurus, I need your help/guidance, please! When I am billing a sales order (VA01), I am getting an error: FI accounting document has not been created, because the "Division" value is missing. I have checked the sales order, and all the "Division" f

  • NO fonts in Font folder?

    Hi ALL, It this normal? Home_Folder>Library>Fonts folder There are NO fonts in the Fonts Folder, it's completely empty. But in ALL my application or in the system everything is working. Is Leopard different from Tiger how the NEW OSX system is handli