summaryrefslogtreecommitdiff
path: root/src/main/java/net/cshift/api
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-11-17 01:22:57 -0500
committerKyle Gunger <kgunger12@gmail.com>2023-11-17 01:22:57 -0500
commit5c5e1b3dd0985986a941a65726f8f2d7bff7a188 (patch)
tree885088839304bfc57329ee38107304ee2422e648 /src/main/java/net/cshift/api
parentcea2f168c50f6c930b2cbdfdd694285f72f28157 (diff)
Add type variable to signature of send and accept
Diffstat (limited to 'src/main/java/net/cshift/api')
-rw-r--r--src/main/java/net/cshift/api/transit/network/Channel.java4
-rw-r--r--src/main/java/net/cshift/api/transit/network/INode.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/cshift/api/transit/network/Channel.java b/src/main/java/net/cshift/api/transit/network/Channel.java
index 3fdae88..758c7d4 100644
--- a/src/main/java/net/cshift/api/transit/network/Channel.java
+++ b/src/main/java/net/cshift/api/transit/network/Channel.java
@@ -139,8 +139,8 @@ public final class Channel<D> {
* @param packet the packet to send
* @return The overflow data if the packet is only partially accepted. {@code null} otherwise.
*/
- public IStaticPacket send(IStaticPacket packet)
+ public IStaticPacket<D> send(IStaticPacket<D> packet)
{
- return to.accept(packet, this);
+ return to.<D>accept(packet, this);
}
}
diff --git a/src/main/java/net/cshift/api/transit/network/INode.java b/src/main/java/net/cshift/api/transit/network/INode.java
index 6653e40..ad9f1d3 100644
--- a/src/main/java/net/cshift/api/transit/network/INode.java
+++ b/src/main/java/net/cshift/api/transit/network/INode.java
@@ -45,7 +45,7 @@ public interface INode
* @param channel The channel which the packet is coming through
* @return The overflow data if the packet is only partially accepted. {@code null} otherwise.
*/
- public IStaticPacket accept(IStaticPacket packet, Channel<?> channel);
+ public <T> IStaticPacket<T> accept(IStaticPacket<T> packet, Channel<T> channel);
/** Pressure
*