interface Filter {
  void dealwithObject ( Object obj );
}class ColorPicker implements Filter {
  void dealwithObject ( Object obj ) {
    if ( obj instanceof ColoredObject ) {
      System.out.println( ((ColorObject)obj).getColor() );
    }
  }
}class ShapePicker implements Filter {
  void dealwithObject ( Object obj ) {
    if ( obj instanceof ShapedObject ) {
      System.out.println( ((ShapedObject)obj).getShape() );
    }
  }
}java.util.Vector<Filter> filters = new java.util.Vector<Filter>();
filters.add( new ColorPicker() );
filters.add( new ShapePicker() );static void pickOnObject ( Object obj ) {
  for ( Filter f : filters ) {
    f.dealwithObject( obj ); // 一个 Filter 的处理并不妨碍下一个 Filter 的处理,相互独立
  }
}这算是 Chain of responsibility 么?
另外,类似 SAX 这样的架构,属于 CoR 么?