@startuml
package com.iluwatar.intercepting.filter {
  abstract class AbstractFilter {
    - next : Filter
    + AbstractFilter()
    + AbstractFilter(next : Filter)
    + execute(order : Order) : String
    + getLast() : Filter
    + getNext() : Filter
    + setNext(filter : Filter)
  }
  class AddressFilter {
    + AddressFilter()
    + execute(order : Order) : String
  }
  class App {
    + App()
    + main(args : String[]) {static}
  }
  class ContactFilter {
    + ContactFilter()
    + execute(order : Order) : String
  }
  class DepositFilter {
    + DepositFilter()
    + execute(order : Order) : String
  }
  interface Filter {
    + execute(Order) : String {abstract}
    + getLast() : Filter {abstract}
    + getNext() : Filter {abstract}
    + setNext(Filter) {abstract}
  }
  class FilterChain {
    - chain : Filter
    + FilterChain()
    + addFilter(filter : Filter)
    + execute(order : Order) : String
  }
  class FilterManager {
    - filterChain : FilterChain
    + FilterManager()
    + addFilter(filter : Filter)
    + filterRequest(order : Order) : String
  }
  class NameFilter {
    + NameFilter()
    + execute(order : Order) : String
  }
  class Order {
    - address : String
    - contactNumber : String
    - depositNumber : String
    - name : String
    - order : String
    + Order()
    + Order(name : String, contactNumber : String, address : String, depositNumber : String, order : String)
    + getAddress() : String
    + getContactNumber() : String
    + getDepositNumber() : String
    + getName() : String
    + getOrder() : String
    + setAddress(address : String)
    + setContactNumber(contactNumber : String)
    + setDepositNumber(depositNumber : String)
    + setName(name : String)
    + setOrder(order : String)
  }
  class OrderFilter {
    + OrderFilter()
    + execute(order : Order) : String
  }
  ~class DListener {
    ~ DListener()
    + actionPerformed(e : ActionEvent)
  }
}
AbstractFilter -->  "-next" Filter
DListener --+ Target
FilterManager -->  "-filterChain" FilterChain
FilterChain -->  "-chain" Filter
AbstractFilter ..|> Filter 
AddressFilter --|> AbstractFilter 
ContactFilter --|> AbstractFilter 
DepositFilter --|> AbstractFilter 
NameFilter --|> AbstractFilter 
OrderFilter --|> AbstractFilter 
@enduml