rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/StandardRule.java
@Override
  @SuppressWarnings("unchecked")
  public StandardRule<T> using(String... factNames) {
    List<String> factNameList = Stream.of(factNames)
        .filter(name -> _factType.isInstance(_facts.getValue(name)))
        .collect(Collectors.toList());
    if (_factNameMap.containsKey((getThen()).size())) {
      List<String> existingFactNames = _factNameMap.get((getThen()).size());
      existingFactNames.addAll(factNameList);
      return this;
    }

    _factNameMap.put((getThen()).size(), factNameList);
    return this;
  }
@Override
  @SuppressWarnings("unchecked")
  public StandardRule<T> using(String... factNames) {
    List<String> factNameList = Stream.of(factNames)
        .filter(name -> _factType.isInstance(_facts.getValue(name)))
        .collect(Collectors.toList());
    if (_factNameMap.containsKey((getThen()).size())) {
      List<String> existingFactNames = _factNameMap.get((getThen()).size());
      existingFactNames.addAll(factNameList);
      return this;
    }

    _factNameMap.put((getThen()).size(), factNameList);
    return this;
  }
@ Override @ SuppressWarnings ( "unchecked" ) public StandardRule < T > using ( String ... factNames ) { List < String > factNameList = Stream . of ( factNames ) . filter ( name -> _factType . isInstance ( _facts . getValue ( name ) ) ) . collect ( Collectors . toList ( ) ) ; if ( _factNameMap . containsKey ( ( getThen ( ) ) . size ( ) ) ) { List < String > existingFactNames = _factNameMap . get ( ( getThen ( ) ) . size ( ) ) ; existingFactNames . addAll ( factNameList ) ; return this ; } _factNameMap . put ( ( getThen ( ) ) . size ( ) , factNameList ) ; return this ; }
The using() method reduces the facts to those specifically named here.
The using() method only applies to the then() method immediately following it.
@param factNames the names of the facts to be used
@return          the current object
The using () method reduces the facts to those specifically named here . The using () method only applies to the then () method immediately following it .