private boolean isSame(DListNode node, short red, short green, short blue, byte direction){
    Run test = new Run(1,red,green,blue);
    if (direction == CURR){
      return node.run.equalsIntensities(test);
    } 
    else if (direction == NEXT && node.next.run != null){
      return node.next.run.equalsIntensities(test);
    }
    else if (direction == PREV && node.prev.run != null){
      return node.prev.run.equalsIntensities(test);
    }
    return false;
  }