publicclassAdaptee{publicvoidactualDoWork(){// do work}}
การเรียกใช้งาน
expectedInterface.doWork();
อ้างอิง
Design Patterns: Elements of Reusable Object-Oriented Software (ISBN 0-201-63361-2) โดย Erich Gamma, Richard Helm, Ralph Johnson และ John Vlissides (Gang of four: GoF)
แหล่งข้อมูลอื่น
Adopt Adapter โดย David Geary (อังกฤษ)
Design Patterns in Java: Adapter โดย Steven John Metsker (อังกฤษ)
อะแด็ปเตอร์แพตเทิร์น โดย อนุภาค มาตรมูล(ไทย)
สิงหาคม 08, 2021
อะแด, ปเตอร, แพตเท, adapter, pattern, เป, นด, ไซน, แพตเท, ใช, เช, อมการทำงานระหว, างคลาสผ, เร, ยกและคลาสท, กเร, ยกในกรณ, คลาสท, กเร, ยกม, เมธอดท, แตกต, างจากท, เร, ยกคาดหว, วอย, างท, เห, นได, ในช, ตประจำว, นเช, หม, อแปลงไฟฟ, หร, อปล, กไฟท, ขาต, างร, ปทรงต, างก. xaaedpetxraephtethirn Adapter pattern epndiisnaephtethirn thiichechuxmkarthanganrahwangkhlasphueriykaelakhlasthithukeriykinkrnithikhlasthithukeriykmiemthxdthiaetktangcakthiphueriykkhadhwng twxyangthiehnidinchiwitpracawnechn hmxaeplngiffa hruxplkifthimikhatangrupthrngtangkncatxngmitwaeplngephuxtxechuxmepntn enuxha 1 karnaipichngan 2 twxyangopraekrm 2 1 phasacawa 3 xangxing 4 aehlngkhxmulxunkarnaipichngan aekikhkarsrangkhlassahrbthahnathiepnxaaedpetxrsamarththaidsxngwithidngniwithikaraebb inheritance ihkhlasxaaedpetxrsbkhlascakkhlasthicathukichngancringaelaihximphliemnthxinetxrefstamthikhlasphueriykkhadhwng khwamsmphnthrahwangphuaeplngaelaphuthukaeplngcaepninaebb is a dngphaphprakxb khlasidxaaekrmkhxngxaaedpetxraephtethirnchnid inheritance inaebb UML withikaraebb delegation ihkhlasxaaedpetxrximphliemnthxinetxrefstamthikhlasphueriykkhadhwngaetimtxngsbkhlas khlasxaaedpetxreriykemthxdkhxngkhlasthicathukichnganphanthangxxbecktkhxngkhlasthithukichngannn khwamsmphnthrahwangphuaeplngaelaphuthukaeplngcaepninaebb has a dngphaph khlasidxaaekrmkhxngxaaedpetxraephtethirnchnid delegation inaebb UMLtwxyangopraekrm aekikhphasacawa aekikh sxrsokhdxaaedpetxraebb inheritance public class Adapter extends Adaptee implements ExpectedInterface public void doWork actualDoWork sxrsokhdxaaedpetxraebb delegation public class Adapter implements ExpectedInterface private Adaptee adaptee public void doWork adaptee actualDoWork xinetxrefsthiokhdphueriykkhadhwng public interface ExpectedInterface public void doWork khlasthithukaeplng public class Adaptee public void actualDoWork do work kareriykichngan expectedInterface doWork xangxing aekikhDesign Patterns Elements of Reusable Object Oriented Software ISBN 0 201 63361 2 ody Erich Gamma Richard Helm Ralph Johnson aela John Vlissides Gang of four GoF aehlngkhxmulxun aekikhAdopt Adapter ody David Geary xngkvs Design Patterns in Java Adapter ody Steven John Metsker xngkvs xaaedpetxraephtethirn ody xnuphakh matrmul ithy ekhathungcak https th wikipedia org w index php title xaaedpetxraephtethirn amp oldid 9350144, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,