Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 2nd, 2011  |  syntax: Java  |  size: 0.54 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     private void setSelectDeselect(int cat, String itemName, boolean selected) {
  2.         int catIndex = listOfIntegers.indexOf(cat);
  3.         Vector<String> vect = listOfVectors.get(catIndex);
  4.         int index = vect.indexOf(itemName);
  5.         if (selected) {
  6.             vect.set(index,DisplayConstants.OPT_USED + itemName);
  7.         } else {
  8.             index = vect.indexOf(DisplayConstants.OPT_USED + itemName);
  9.             if (index == -1) {
  10.                 return;
  11.             }
  12.             vect.set(index, itemName);
  13.         }
  14.     }
clone this paste RAW Paste Data