-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Took 3 hours 17 minutes
- Loading branch information
Showing
10 changed files
with
294 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
package com.duncpro.jroute.route; | ||
|
||
import java.util.List; | ||
|
||
public class RouteElement { | ||
protected RouteElement() {} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/com/duncpro/jroute/router/PositionedEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.duncpro.jroute.router; | ||
|
||
import com.duncpro.jroute.HttpMethod; | ||
import com.duncpro.jroute.route.Route; | ||
|
||
import java.util.Objects; | ||
|
||
public class PositionedEndpoint<E> { | ||
public final Route route; | ||
public final HttpMethod method; | ||
public final E endpoint; | ||
|
||
public PositionedEndpoint(Route route, HttpMethod method, E endpoint) { | ||
this.route = Objects.requireNonNull(route); | ||
this.method = Objects.requireNonNull(method); | ||
this.endpoint = Objects.requireNonNull(endpoint); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
PositionedEndpoint<?> that = (PositionedEndpoint<?>) o; | ||
return route.equals(that.route) && method == that.method && endpoint.equals(that.endpoint); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(route, method, endpoint); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.