コード例 #1
0
 @SuppressWarnings({"unchecked", "rawtypes"})
 public <T, V> boolean register(String parm, BiConsumer<? super T, V> biConsumer, T bean) {
   WeakBus<Object> weakBus = getBus(parm);
   if (weakBus == null) {
     return false;
   }
   weakBus.register((BiConsumer) biConsumer, bean);
   return true;
 }
コード例 #2
0
 @SuppressWarnings({"unchecked", "rawtypes"})
 public <T, V> boolean registerAsSubBus(
     String parm, BiConsumer<? super T, Supplier<? extends V>> subBusBiConsumer, T subBusBean) {
   WeakBus<Object> weakBus = getBus(parm);
   if (weakBus == null) {
     return false;
   }
   weakBus.registerSubBus((BiConsumer) subBusBiConsumer, subBusBean);
   return true;
 }