mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
优化SLOT的结构
This commit is contained in:
@@ -86,7 +86,7 @@ public abstract class NodeComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Slot getSlot(){
|
||||
public <T extends Slot> T getSlot(){
|
||||
return DataBus.getSlot(this.slotIndexTL.get());
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,9 @@ public class DataBus {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static Slot getSlot(int slotIndex){
|
||||
return slots[slotIndex];
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends Slot> T getSlot(int slotIndex){
|
||||
return (T)slots[slotIndex];
|
||||
}
|
||||
|
||||
public static void releaseSlot(int slotIndex){
|
||||
|
||||
Reference in New Issue
Block a user