Package cartago

Examples of cartago.Tuple


  public TupleFilter(Tuple t){
    tuple = t;
  }
 
  public boolean select(ArtifactObsEvent ev){
    Tuple sig = ev.getSignal();
    if (sig != null){
      if (tuple.getLabel().equals(sig.getLabel()) && tuple.getNArgs() == sig.getNArgs()){
        for (int i = 0; i < tuple.getNArgs(); i++){
          Object arg = tuple.getContent(i);
          if (arg!=null && !arg.equals(sig.getContent(i))){
            return false;
          }
        }
        return true;
      } else {
View Full Code Here


  public TupleListFilter(Tuple[] list){
    tlist = list;
  }
 
  public boolean select(ArtifactObsEvent ev){
    Tuple sig = ev.getSignal();
    if (sig != null){
      for (Tuple tuple: tlist){
        if (tuple.getLabel().equals(sig.getLabel()) && tuple.getNArgs() == sig.getNArgs()){
          boolean match = false;
          for (int i = 0; i < tuple.getNArgs(); i++){
            Object arg = tuple.getContent(i);
            if (arg!=null && !arg.equals(sig.getContent(i))){
              match = false;
              break;
            }
          }
          if (match){
View Full Code Here

TOP

Related Classes of cartago.Tuple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.