Skip to content

Commit 58c56df

Browse files
author
Kulkarni
committed
Initial Commit
0 parents  commit 58c56df

16 files changed

Lines changed: 1095 additions & 0 deletions

File tree

.classpath

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
26+
<attributes>
27+
<attribute name="maven.pomderived" value="true"/>
28+
</attributes>
29+
</classpathentry>
30+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
31+
<attributes>
32+
<attribute name="maven.pomderived" value="true"/>
33+
</attributes>
34+
</classpathentry>
35+
<classpathentry kind="output" path="target/classes"/>
36+
</classpath>

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.class
2+
3+
# Mobile Tools for Java (J2ME)
4+
.mtj.tmp/
5+
6+
# Package Files #
7+
*.jar
8+
*.war
9+
*.ear
10+
11+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12+
hs_err_pid*

.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>design-patterns-uisng-java</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
3+
org.eclipse.jdt.core.compiler.compliance=1.7
4+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5+
org.eclipse.jdt.core.compiler.source=1.7
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# java-design-patterns
2+
My Implementations of Common Design Patterns for later reference and display

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.linux.design.patterns.examples</groupId>
5+
<artifactId>design-patterns-uisng-java</artifactId>
6+
<version>0.0.1-SNAPSHOT</version>
7+
8+
<properties>
9+
<maven.compiler.source>1.7</maven.compiler.source>
10+
<maven.compiler.target>1.7</maven.compiler.target>
11+
</properties>
12+
13+
<dependencies>
14+
<dependency>
15+
<groupId>net.bytebuddy</groupId>
16+
<artifactId>byte-buddy</artifactId>
17+
<version>0.7.7</version>
18+
<scope>test</scope>
19+
</dependency>
20+
<dependency>
21+
<groupId>junit</groupId>
22+
<artifactId>junit</artifactId>
23+
<version>4.12</version>
24+
<scope>test</scope>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.hamcrest</groupId>
28+
<artifactId>hamcrest-core</artifactId>
29+
<version>1.3</version>
30+
<scope>test</scope>
31+
</dependency>
32+
33+
</dependencies>
34+
35+
</project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.linux.designpatterns.adapter.cc;
2+
3+
import java.math.BigDecimal;
4+
5+
/**
6+
* Existing Credit card interface.
7+
*
8+
* @author guru@linux.com
9+
*
10+
*/
11+
public interface CcOne {
12+
13+
public String getCreditCardNo();
14+
public String getCustomerName();
15+
public String getCardExpMonth();
16+
public String getCardExpYear();
17+
public Short getCardCVVNo();
18+
public BigDecimal getAmount();
19+
public void setCreditCardNo(String creditCardNo);
20+
public void setCustomerName(String customerName);
21+
public void setCardExpMonth(String cardExpMonth);
22+
public void setCardExpYear(String cardExpYear);
23+
public void setCardCVVNo(Short cardCVVNo);
24+
public void setAmount(BigDecimal amount);
25+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.linux.designpatterns.adapter.cc;
2+
3+
/**
4+
*
5+
* New Interface that is similar but not exactly same as existing.
6+
*
7+
* @author guru
8+
*
9+
*/
10+
public interface CcTwo {
11+
12+
public String getCustCardNo();
13+
14+
public String getCardOwnerName();
15+
16+
public String getCardExpMonthDate();
17+
18+
public Integer getCVVNo();
19+
20+
public Double getTotalAmount();
21+
22+
public void setCustCardNo(String custCardNo);
23+
24+
public void setCardOwnerName(String cardOwnerName);
25+
26+
public void setCardExpMonthDate(String cardExpMonthDate);
27+
28+
public void setCVVNo(Integer cVVNo);
29+
30+
public void setTotalAmount(Double totalAmount);
31+
}

0 commit comments

Comments
 (0)