Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
target/
*tmp
tmp*

##############
# Eclipse IDE
Expand Down
11 changes: 11 additions & 0 deletions DesignNotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Main Code Features
- uses guava: great library (collections, etc.), cleaner code
- fluent api?
- RangeSetUtil
- use of generics (template method)
-


Test Code Features
- use hamcrest
- use mock ?
94 changes: 50 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>sy.andrew</groupId>
<artifactId>linkifier</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>linkifier</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-junit</artifactId>
<version>2.0.0.0</version>
</dependency>
</dependencies>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>sy.andrew</groupId>
<artifactId>linkifier</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>linkifier</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-junit</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
29 changes: 0 additions & 29 deletions src/main/java/sy/andrew/linkifier/LinkifyProcessingQueue.java

This file was deleted.

103 changes: 0 additions & 103 deletions src/main/java/sy/andrew/linkifier/MultithreadDemo.java

This file was deleted.

6 changes: 3 additions & 3 deletions src/main/java/sy/andrew/linkifier/ProcessingQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
* Interface for a FIFO queue which performs some processing on its inputs
* before making them available to consumers.
*/
public interface ProcessingQueue
public interface ProcessingQueue<T>
{
/**
* Inserts the specified element into this queue, if possible.
*
* @param input the element to insert.
* @return true if it was possible to add the element to this queue, else false
*/
boolean offer(String input);
boolean offer(T input);

/**
* Retrieves and removes the head of this queue, or null if this queue is empty.
*
* @return the head of this queue, or null if this queue is empty.
*/
String poll();
T poll();
}
27 changes: 0 additions & 27 deletions src/main/java/sy/andrew/linkifier/SingleThreadDemo.java

This file was deleted.

Loading