Added getPredecessor() method

There are times when a template needs to know the preceding item in a list, this method gets that item.