public void markAsSpent(TransactionInput input){
  availableForSpending=false;
  spentBy=input;
}

public void markAsSpent ( TransactionInput input ) { availableForSpending = false ; spentBy = input ; }
sets this objects availableforspending flag to false and the spentby pointer to the given input . if the input is null , it means this output was signed over to somebody else rather than one of our own keys .
