need help adding debounce to my code

sorry i didnt see the link before im trying to extract the debounceing part of his code is it more then just

boolean debounce(int thisButton) {
  boolean current = digitalRead(swiPin[thisButton]);
  if (currentButtonVal[thisButton] != current) {
    delay(5);
    current = digitalRead(swiPin[thisButton]);
  }
  currentButtonVal[thisButton] = current;  // store new state for your pin
  return current;
}