Examples of accepts()


Examples of org.openscience.cdk.io.ISimpleChemObjectReader.accepts()

            boolean rgrpQuery=false;
            if (reader != null) {
                IAtomContainer readMolecule =
                    chemModel.getBuilder().newInstance(IAtomContainer.class);
                try {
                    if (reader.accepts(IAtomContainer.class)) {
                        toPaste = (IAtomContainer) reader.read(readMolecule);
                    } else if (reader.accepts(ChemFile.class)) {
                        toPaste = readMolecule;
                        IChemFile file = (IChemFile) reader.read(new ChemFile());
                        for (IAtomContainer ac :
View Full Code Here

Examples of org.sbml.jsbml.util.filters.CVTermFilter.accepts()

   */
  public List<CVTerm> filterCVTerms(Qualifier qualifier) {
    LinkedList<CVTerm> l = new LinkedList<CVTerm>();
    CVTermFilter filter = new CVTermFilter(qualifier);
    for (CVTerm term : getListOfCVTerms()) {
      if (filter.accepts(term)) {
        l.add(term);
      }
    }
    return l;
  }
View Full Code Here

Examples of pl.edu.amu.wmi.daut.base.AutomatonByRecursion.accepts()

         AutomatonSpecification spec = operator.createFixedAutomaton();
         assertFalse(spec.isEmpty());
         assertFalse(spec.acceptEmptyWord());
         AutomatonByRecursion automaton = new AutomatonByRecursion(spec);

         assertFalse(automaton.accepts(" "));
         assertFalse(automaton.accepts("\n"));
         assertFalse(automaton.accepts("\t"));
         assertFalse(automaton.accepts("\f"));
         assertFalse(automaton.accepts("\u000B"));
         assertFalse(automaton.accepts("\r"));
View Full Code Here

Examples of pl.edu.amu.wmi.daut.base.NondeterministicAutomatonByThompsonApproach.accepts()

        NumericalRangeOperator spec = new NumericalRangeOperator(101, 101);
        NondeterministicAutomatonByThompsonApproach automaton =
                new NondeterministicAutomatonByThompsonApproach(spec.createFixedAutomaton());

        assertTrue(automaton.accepts("101"));
        assertFalse(automaton.accepts(""));
        assertFalse(automaton.accepts("1"));
        assertFalse(automaton.accepts("100"));
        assertFalse(automaton.accepts("102"));
        assertFalse(automaton.accepts("a101b"));
View Full Code Here

Examples of sizzle.types.SizzleTable.accepts()

          throw new TypeException("incorrect type " + indices.get(i) + " for index " + i);
    } else if (t.countIndices() > 0)
      throw new TypeException("indices missing from emit");

    final SizzleType expression = n.f4.accept(this, argu);
    if (!t.accepts(expression))
      throw new TypeException("incorrect type " + expression + " for " + id + ":" + t);

    if (n.f5.present()) {
      if (t.getWeightType() == null)
        throw new TypeException("unexpected weight specified by emit");
View Full Code Here

Examples of xbird.xquery.type.Type.Occurrence.accepts()

    }

    public static boolean instanceOf(final Sequence<? extends Item> value, final Type type) {
        final Occurrence occ = type.quantifier();
        if(value.isEmpty()) {
            return occ.accepts(Occurrence.OCC_ZERO.getAlignment());
        }
        final Type expected = (type instanceof SequenceType) ? ((SequenceType) type).prime() : type;
        int count = 0;
        final IFocus<? extends Item> valueItor = value.iterator();
        for(Item it : valueItor) {
View Full Code Here

Examples of xbird.xquery.type.Type.Occurrence.accepts()

        valueItor.closeQuietly();
        if(count == 0) {
            throw new IllegalStateException();
        }
        if(count == 1) {
            return occ.accepts(Occurrence.OCC_EXACTLY_ONE.getAlignment());
        } else {
            return occ.accepts(Occurrence.OCC_MORE.getAlignment());
        }
    }
View Full Code Here

Examples of xbird.xquery.type.Type.Occurrence.accepts()

            throw new IllegalStateException();
        }
        if(count == 1) {
            return occ.accepts(Occurrence.OCC_EXACTLY_ONE.getAlignment());
        } else {
            return occ.accepts(Occurrence.OCC_MORE.getAlignment());
        }
    }

    public static Type union(final Type baseType, final Type type) {
        if(baseType instanceof ChoiceType) {
View Full Code Here

Examples of xbird.xquery.type.Type.Occurrence.accepts()

                final List<XQExpression> params = funcall.getParams();
                if(params.size() == 1) {
                    FunctionSignature sig = funcall.getFunction().getFunctionSignature(1);
                    Type type = sig.getArgumentType(0);
                    Occurrence occ = type.quantifier();
                    if(!occ.accepts(Occurrence.OCC_ZERO_OR_MORE.getAlignment())) {
                        return flwr; //TODO REVIEWME
                    }
                    final XQExpression firstArg = params.get(0);
                    final XQExpression cutted = recApplyFLWRCuttingInternal(flwr, firstArg);
                    if(cutted != flwr) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.