public boolean deleteProperty ( String name ) { BugProperty prev = null ; BugProperty prop = propertyListHead ; while ( prop != null ) { if ( prop . getName ( ) . equals ( name ) ) { break ; } prev = prop ; prop = prop . getNext ( ) ; } if ( prop != null ) { if ( prev != null ) { // Deleted node in interior or at tail of list prev . setNext ( prop . getNext ( ) ) ; } else { // Deleted node at head of list propertyListHead = prop . getNext ( ) ; } if ( prop . getNext ( ) == null ) { // Deleted node at end of list propertyListTail = prev ; } return true ; } else { // No such property return false ; } }
Delete property with given name .