<br />
<b>Warning</b>:  Declaration of PageLinesBanners::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/banners/section.php</b> on line <b>205</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesFeatures::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/features/section.php</b> on line <b>254</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesFeatures::section_head($clone_id) should be compatible with PageLinesSection::section_head() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/features/section.php</b> on line <b>61</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesHighlight::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/highlight/section.php</b> on line <b>94</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesCarousel::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/carousel/section.php</b> on line <b>168</b><br />
<br />
<b>Warning</b>:  Declaration of PLheroUnit::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/hero/section.php</b> on line <b>140</b><br />
<br />
<b>Warning</b>:  Declaration of PLNavBar::section_template($clone_id, $location = '') should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/navbar/section.php</b> on line <b>199</b><br />
<br />
<b>Warning</b>:  Declaration of PLMasthead::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/masthead/section.php</b> on line <b>178</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesQuickSlider::section_template($clone_id) should be compatible with PageLinesSection::section_template() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/quickslider/section.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>:  Declaration of PageLinesQuickSlider::section_head($clone_id) should be compatible with PageLinesSection::section_head() in <b>/home/c0nannet/public_html/blog/wp-content/themes/pagelines/sections/quickslider/section.php</b> on line <b>29</b><br />
{"id":88,"date":"2012-10-20T14:01:06","date_gmt":"2012-10-20T14:01:06","guid":{"rendered":"http:\/\/c0nan.net\/blog\/?p=88"},"modified":"2012-10-29T14:03:24","modified_gmt":"2012-10-29T14:03:24","slug":"awesome-generics","status":"publish","type":"post","link":"https:\/\/c0nan.net\/blog\/awesome-generics\/","title":{"rendered":"Awesome&lt;Generics extends Magic&gt;"},"content":{"rendered":"<p>What is Java generics? It is the ability\u00a0 defining a scope without really knowing the scope, but knowing limitations to the scope. Generics was the obvious follow up tot the concept of interfaces. Taking abstract to a whole new level of awesomeness!!!<\/p>\n<p>Let me explain in the most simplest ways I can think off:<\/p>\n<p>1. You have a hosepipe<\/p>\n<p>2. You want to fit odds and ends to the hosepipe (sprayGun)<\/p>\n<p>3. you need to develop a middle object connector, interface for these objects to fit onto the hosepipe<\/p>\n<p>4. you want the connector to be able to do a specific set of access ways (connectToPipe, connectToConnector, sendWater, recieveWater)<\/p>\n<p>5. you want the connector to have a set expected input, and expected outputs (waterFlow,5mmWaterFlow,3mmWaterFlow)<\/p>\n<p>So we begin:<\/p>\n<p>HosePipe.java<\/p>\n<pre>public class HosePipe extends Connector&lt;WaterFlow5mm&gt;{\r\n   public void sendWaterflow(WaterFlow5mm waterflow){\r\n     \u00a0\/\/ Do whatever to the water that was sent to me\r\n      System.out.println(waterflow.getWater().toString(););\r\n  \u00a0}\r\n   public WaterFlow5mm recieveWaterflow(){\r\n      return new WaterFlow5mm();\r\n  \u00a0}\r\n}<\/pre>\n<p>SprayGun.java<\/p>\n<pre>public class SprayGun extends Connector&lt;WaterFlow5mm&gt;{\r\n    public void sendWaterflow(WaterFlow5mm waterflow){\r\n \u00a0     \/\/ Do whatever to the water that was sent to me\r\n       System.out.println(waterflow.getWater().toString(););\r\n   \u00a0} \r\n\r\n     public WaterFlow5mm recieveWaterflow(){\r\n        return return new WaterFlow5mm();\r\n \u00a0   }\r\n\r\n\u00a0}<\/pre>\n<p>Water.java<\/p>\n<pre>public class Water(){\r\n\r\nprivate int oxygen = 1;\r\nprivate int hydrogen = 2\r\npublic int getOxygen(){\r\n  return oxygen;\r\n}\r\n\r\npublic int getHydrogen (){\r\n   return hydrogen ;\r\n}\r\n\r\n}<\/pre>\n<p>WaterFlow.java<\/p>\n<pre>public abstract class WaterFlow(){\r\npublic Water[] getWater();\r\n\r\n}<\/pre>\n<p>WaterFlow5mm.java<\/p>\n<pre>public class WaterFlow5mm(){\r\npublic Water[] getWater(){\r\n\r\nreturn new Water[5];\r\n\r\n}\r\n\r\n}<\/pre>\n<p>Connector.java<\/p>\n<pre>public abstract class Connector&lt;A extends WaterFlow&gt; implements Connectable&lt;A&gt;{\r\n\r\nboolean connectToPipe(){\r\n\r\n\/\/click\r\n\r\n};\r\n\r\nboolean connectToOdds(){\r\n\r\n\/\/click\r\n\r\n};\r\n\r\npublic abstract void sendWater(A waterflow);\r\n\r\npublic abstract A recieveWaterflow();\r\n\r\n}<\/pre>\n<p>Connectable.java<\/p>\n<pre>public interface Connectable&lt;A extends WaterFlow&gt;{\r\n\r\nboolean connectToPipe();\r\n\r\nboolean connectToOdds();\r\n\r\nvoid sendWaterflow(A waterflow);\r\n\r\nA recieveWaterflow();\r\n\r\n}\r\n\r\nNow there are many more examples how generics can be used to simplify 'n project, but also be careful NOT to over complicate your project with generics.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What is Java generics? It is the ability\u00a0 defining a scope without really knowing the scope, but knowing limitations to the scope. Generics was the obvious follow up tot the concept of interfaces. Taking abstract to a whole new level of awesomeness!!! Let me explain in the most simplest ways I can think off: 1. [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,10],"tags":[],"_links":{"self":[{"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/posts\/88"}],"collection":[{"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":11,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/posts\/88\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c0nan.net\/blog\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}