playMaker

Author Topic: array list compare  (Read 2436 times)

krane

  • Junior Playmaker
  • **
  • Posts: 63
array list compare
« on: February 21, 2017, 09:02:25 AM »
There is an "array compare" action, but no array list compare. Can anyone help build one?

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: array list compare
« Reply #1 on: February 21, 2017, 10:22:26 AM »
There isn't a direct method to compare built-in to ArrayLists. There is arraylist.contain and there is an action for this... With that you can achieve the same effect.

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: array list compare
« Reply #2 on: February 21, 2017, 10:49:32 AM »
Sorry, can you clarify that explanation?
I have two somewhat large arrays  (256 ints) that I need to compare to see if they hold the same values between the two arrays.
« Last Edit: February 21, 2017, 12:33:35 PM by krane »

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: array list compare
« Reply #3 on: February 21, 2017, 01:41:49 PM »
Yup, so you use ArrayList Contain action, if you don't have it then check on ecosystem.

So ArrayList A, ArrayListB and you basically check if B Contains items from A. You can also download on ecosystem the same action but with a counter, so you can count how many were the same.

krane

  • Junior Playmaker
  • **
  • Posts: 63
Re: array list compare
« Reply #4 on: February 21, 2017, 01:49:27 PM »
Thank you