public ATermAppl translate(AtomObject obj) { term = null; obj.accept( this ); return term; }
public ATermAppl translate(AtomObject obj) { term = null; obj.accept( this ); return term; }
public NodeProvider translateObject(AtomObject obj, boolean allowNull) { dependency = DependencySet.INDEPENDENT; obj.accept(this); if (result == null && !allowNull) { throw new UnsupportedOperationException(); } return result; }
/** * Returns true if atom object is a variable */ public static boolean isVariable(AtomObject obj) { VisitingCollector collector = new VisitingCollector(); obj.accept( collector ); return collector.getVariables().size() == 1; }
/** * Returns true if atom object is a variable */ public static boolean isVariable(AtomObject obj) { VisitingCollector collector = new VisitingCollector(); obj.accept( collector ); return collector.getVariables().size() == 1; }
/** * Static convenience function to return the instance variables used * in the given atom. */ public static Collection<AtomIVariable> getIVars(RuleAtom atom) { VisitingICollector collector = new VisitingICollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Static convenience function to return the instance variables used * in the given atom. */ public static Collection<AtomDVariable> getDVars(RuleAtom atom) { VisitingDCollector collector = new VisitingDCollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Static convenience function to return the instance variables used * in the given atom. */ public static Collection<AtomDVariable> getDVars(RuleAtom atom) { VisitingDCollector collector = new VisitingDCollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Static convenience function to return the variables used * in the given atom. */ public static Collection<AtomVariable> getVars(RuleAtom atom) { VisitingCollector collector = new VisitingCollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Static convenience function to return the instance variables used * in the given atom. */ public static Collection<AtomIVariable> getIVars(RuleAtom atom) { VisitingICollector collector = new VisitingICollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Static convenience function to return the variables used * in the given atom. */ public static Collection<AtomVariable> getVars(RuleAtom atom) { VisitingCollector collector = new VisitingCollector(); for( AtomObject obj : atom.getAllArguments() ) { obj.accept( collector ); } return collector.getVariables(); }
/** * Return a pair of a term, and a dependency set. The dependency set will be * non-null if the atom object represented a constant which was merged to * another node. */ public Pair<ATermAppl, DependencySet> translateAtomObject(AtomObject obj) { AtomObjectTranslator translator = new AtomObjectTranslator(); obj.accept(translator); return new Pair<ATermAppl, DependencySet>(translator.getResult(), translator.getDependency()); }