<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FDesign_Pattern%2FBridge_Pattern</id>
		<title>Java Tutorial/Design Pattern/Bridge Pattern - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java_Tutorial%2FDesign_Pattern%2FBridge_Pattern"/>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/Design_Pattern/Bridge_Pattern&amp;action=history"/>
		<updated>2026-04-10T20:42:31Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://jexp.ru/index.php?title=Java_Tutorial/Design_Pattern/Bridge_Pattern&amp;diff=4448&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/Design_Pattern/Bridge_Pattern&amp;diff=4448&amp;oldid=prev"/>
				<updated>2010-06-01T05:02:22Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 05:02, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://jexp.ru/index.php?title=Java_Tutorial/Design_Pattern/Bridge_Pattern&amp;diff=4447&amp;oldid=prev</id>
		<title> в 17:44, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java_Tutorial/Design_Pattern/Bridge_Pattern&amp;diff=4447&amp;oldid=prev"/>
				<updated>2010-05-31T17:44:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==  A demonstration of the structure and operation of the Bridge Pattern. ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
class Abstraction {&lt;br /&gt;
  private Task task;&lt;br /&gt;
  public Abstraction(Task imp) {&lt;br /&gt;
    task = imp;&lt;br /&gt;
  }&lt;br /&gt;
  public void service1() {&lt;br /&gt;
    task.task1();&lt;br /&gt;
    task.task2();&lt;br /&gt;
  }&lt;br /&gt;
  public void service2() {&lt;br /&gt;
    task.task2();&lt;br /&gt;
    task.task3();&lt;br /&gt;
  }&lt;br /&gt;
  public void service3() {&lt;br /&gt;
    task.task1();&lt;br /&gt;
    task.task2();&lt;br /&gt;
    task.task4();&lt;br /&gt;
  }&lt;br /&gt;
  protected Task getImplementation() {&lt;br /&gt;
    return task;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class ClientService1 extends Abstraction {&lt;br /&gt;
  public ClientService1(Task imp) {&lt;br /&gt;
    super(imp);&lt;br /&gt;
  }&lt;br /&gt;
  public void serviceA() {&lt;br /&gt;
    service1();&lt;br /&gt;
    service2();&lt;br /&gt;
  }&lt;br /&gt;
  public void serviceB() {&lt;br /&gt;
    service3();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class ClientService2 extends Abstraction {&lt;br /&gt;
  public ClientService2(Task imp) {&lt;br /&gt;
    super(imp);&lt;br /&gt;
  }&lt;br /&gt;
  public void serviceC() {&lt;br /&gt;
    service2();&lt;br /&gt;
    service3();&lt;br /&gt;
  }&lt;br /&gt;
  public void serviceD() {&lt;br /&gt;
    service1();&lt;br /&gt;
    service3();&lt;br /&gt;
  }&lt;br /&gt;
  public void serviceE() {&lt;br /&gt;
    getImplementation().task3();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
interface Task {&lt;br /&gt;
  void task1();&lt;br /&gt;
  void task2();&lt;br /&gt;
  void task3();&lt;br /&gt;
  void task4();&lt;br /&gt;
}&lt;br /&gt;
class Integration1 {&lt;br /&gt;
  public void method1() {&lt;br /&gt;
    System.out.println(&amp;quot;Integration1.method1()&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  public void method2() {&lt;br /&gt;
    System.out.println(&amp;quot;Integration1.method2()&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class Integration {&lt;br /&gt;
  public void operation1() {&lt;br /&gt;
    System.out.println(&amp;quot;Integration.operation1()&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  public void operation2() {&lt;br /&gt;
    System.out.println(&amp;quot;Integration.operation2()&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  public void operation3() {&lt;br /&gt;
    System.out.println(&amp;quot;Integration.operation3()&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class Implementation1 implements Task {&lt;br /&gt;
  private Integration1 delegate = new Integration1();&lt;br /&gt;
  public void task1() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation1.facility1&amp;quot;);&lt;br /&gt;
    delegate.method1();&lt;br /&gt;
  }&lt;br /&gt;
  public void task2() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation1.facility2&amp;quot;);&lt;br /&gt;
    delegate.method2();&lt;br /&gt;
  }&lt;br /&gt;
  public void task3() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation1.facility3&amp;quot;);&lt;br /&gt;
    delegate.method2();&lt;br /&gt;
    delegate.method1();&lt;br /&gt;
  }&lt;br /&gt;
  public void task4() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation1.facility4&amp;quot;);&lt;br /&gt;
    delegate.method1();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
class Implementation2 implements Task {&lt;br /&gt;
  private Integration delegate = new Integration();&lt;br /&gt;
  public void task1() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation2.facility1&amp;quot;);&lt;br /&gt;
    delegate.operation1();&lt;br /&gt;
  }&lt;br /&gt;
  public void task2() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation2.facility2&amp;quot;);&lt;br /&gt;
    delegate.operation2();&lt;br /&gt;
  }&lt;br /&gt;
  public void task3() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation2.facility3&amp;quot;);&lt;br /&gt;
    delegate.operation3();&lt;br /&gt;
  }&lt;br /&gt;
  public void task4() {&lt;br /&gt;
    System.out.println(&amp;quot;Implementation2.facility4&amp;quot;);&lt;br /&gt;
    delegate.operation1();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
public class BridgeStructure {&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    ClientService1 cs1 = new ClientService1(new Implementation1());&lt;br /&gt;
    cs1.serviceA();&lt;br /&gt;
    cs1.serviceB();&lt;br /&gt;
    cs1 = new ClientService1(new Implementation2());&lt;br /&gt;
    cs1.serviceA();&lt;br /&gt;
    cs1.serviceB();&lt;br /&gt;
    ClientService2 cs2 = new ClientService2(new Implementation1());&lt;br /&gt;
    cs2.serviceC();&lt;br /&gt;
    cs2.serviceD();&lt;br /&gt;
    cs2.serviceE();&lt;br /&gt;
    cs2 = new ClientService2(new Implementation2());&lt;br /&gt;
    cs2.serviceC();&lt;br /&gt;
    cs2.serviceD();&lt;br /&gt;
    cs2.serviceE();&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>