static ComponentOrientation() { rlLangs.add("ar"); //$NON-NLS-1$ rlLangs.add("fa"); //$NON-NLS-1$ rlLangs.add("iw"); //$NON-NLS-1$ rlLangs.add("ur"); //$NON-NLS-1$ }
protected override void addAxioms(org.semanticweb.owlapi.model.OWLNamedIndividual entity, org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, org.semanticweb.owlapi.model.OWLDataFactory dataFactory, java.util.Set result) { { var propIter = reasoner.getRootOntology().getObjectPropertiesInSignature(true).iterator(); while (propIter.hasNext()) { var prop = propIter.next() as OWLObjectProperty; if (!prop.isTopEntity()) { var valueIter = reasoner.getObjectPropertyValues(entity, prop).getFlattened().iterator(); while (valueIter.hasNext()) { result.add(dataFactory.getOWLObjectPropertyAssertionAxiom(prop, entity, valueIter.next() as OWLNamedIndividual)); } } } } if (useData) { var propIter = reasoner.getRootOntology().getDataPropertiesInSignature(true).iterator(); while (propIter.hasNext()) { var prop = propIter.next() as OWLDataProperty; if (!prop.isTopEntity()) { var valueIter = reasoner.getDataPropertyValues(entity, prop).iterator(); while (valueIter.hasNext()) { result.add(dataFactory.getOWLDataPropertyAssertionAxiom(prop, entity, valueIter.next() as OWLLiteral)); } } } } }
/** * Adds an addition change. * * @param pChange * the change which should result in an addition */ private void addAddition(Change pChange) { if (Change.TYPE_ADD != pChange.type() || pChange.getInput() == null) { return; } if (!changes.isEmpty()) { for (java.util.Iterator <Change> it = changes.iterator(); it.hasNext();) { Change change = it.next(); if (change.type() == Change.TYPE_ADD && change.getEntry() != null) { org.apache.commons.compress.archivers.ArchiveEntry entry = change.getEntry(); if (entry.equals(pChange.getEntry())) { if (pChange.isReplaceMode()) { it.remove(); changes.add(pChange); return; } else { // do not add this change return; } } } } } changes.add(pChange); }
internal void addUserAgent(String userAgent) { // Google-specific optimization: a '*' followed by space and more characters // in a user-agent record is still regarded a global rule. if (userAgent.length() >= 1 && userAgent.charAt(0) == '*' && (userAgent.length() == 1 || java.lang.Character.isWhitespace(userAgent.charAt(1)))) { if (userAgent.length() > 1 && java.lang.Character.isWhitespace(userAgent.charAt(1))) { //FIXME: //logger.atInfo().log("Assuming \"%s\" user-agent as \"*\"", userAgent); } global = true; } else { int end = 0; for (; end < userAgent.length(); end++) { char ch = userAgent.charAt(end); if (!java.lang.Character.isAlphabetic(ch) && ch != '-' && ch != '_') { break; } } userAgents.add(userAgent.substring(0, end)); } }
public override void add(Object obj) { if (setJ.contains(obj) == false) { base.add(obj); setJ.add(obj); } }
protected internal virtual void getCorrespondingTerminalNodes(ViewGraphNode root, Set target) { BaseNode n = root.ReteNode; if (n is TerminalNode) { target.add(n); } Iterator it = root.childs.iterator(); while (it.hasNext()) { ViewGraphNode succ = (ViewGraphNode)it.next(); getCorrespondingTerminalNodes(succ, target); } }
private void extractPerms(string[] strList, java.util.Set <android.content.pm.PermissionInfo > permSet) { if ((strList == null) || (strList.Length == 0)) { return; } foreach (string permName in strList) { try { android.content.pm.PermissionInfo tmpPermInfo = mPm.getPermissionInfo(permName, 0 ); if (tmpPermInfo != null) { permSet.add(tmpPermInfo); } } catch (android.content.pm.PackageManager.NameNotFoundException) { android.util.Log.i(TAG, "Ignoring unknown permission:" + permName); } } }
protected internal virtual void getCorrespondingTerminalNodes(ViewGraphNode root, Set target) { BaseNode n = root.ReteNode; if (n is TerminalNode) target.add(n); Iterator it = root.childs.iterator(); while (it.hasNext()) { ViewGraphNode succ = (ViewGraphNode) it.next(); getCorrespondingTerminalNodes(succ, target); } }
/** * Evaluates the predicate returning true if the input object hasn't been * received yet. * * @param object the input object * @return true if this is the first time the object is seen */ public bool evaluate(Object obj) { return(iSet.add(obj)); }
public bool addOutEdge(Object secondProvider) { return(outgoingNodes.add(secondProvider)); }
/// <summary> /// Adds the given assembly to the included set, if and only /// if it is not contained by the encountered set and it /// is not a system assembly; a core HSQLDB assembly; an /// IKVM assembly; an NUnit assembly or a TestDriven.NET /// assembly. /// </summary> /// <remarks> /// The exclusion list could be made much larger to produce /// a higher quality included set, but at what price? /// </remarks> /// <param name="encountered">The assemblies encountered so far.</param> /// <param name="included">The assemblies included so far.</param> /// <param name="entry">The assembly to add.</param> internal static void AddAssembly( Set encountered, Set included, Assembly entry) { if (entry == null || encountered.contains(entry)) { return; } else { encountered.add(entry); } string simpleName = entry.GetName().Name; // ignored (performance optimization) if (simpleName == "System" || simpleName == "mscorlib" || simpleName == "Org.Hsqldb" || simpleName.StartsWith("System.") || simpleName.StartsWith("IKVM.") || simpleName.StartsWith("nunit.") || simpleName.StartsWith("TestDriven.")) { return; } else { included.add(entry); } try { Assembly satellite = entry.GetSatelliteAssembly(CultureInfo.CurrentCulture); IkvmResourceLoaderFactory.AddAssembly( encountered, included, satellite); } catch (Exception ex) { #if DEBUG Debug.WriteLine(ex); #endif } AssemblyName[] referencedAssemblies = entry.GetReferencedAssemblies(); for (int i = 0; i < referencedAssemblies.Length; i++) { AssemblyName assemblyName = referencedAssemblies[i]; try { Assembly referencedAssembly = Assembly.Load(assemblyName); IkvmResourceLoaderFactory.AddAssembly( encountered, included, referencedAssembly); } catch (System.Exception ex) { #if DEBUG Debug.WriteLine(ex); #endif } } }
internal void addRule(Parser.DirectiveType directiveType, String directiveValue) { rules.add(new Rule(directiveType, directiveValue)); }
/// <summary> /// Adds the given assembly to the included set, if and only /// if it is not contained by the encountered set and it /// is not a system assembly; a core HSQLDB assembly; an /// IKVM assembly; an NUnit assembly or a TestDriven.NET /// assembly. /// </summary> /// <remarks> /// The exclusion list could be made much larger to produce /// a higher quality included set, but at what price? /// </remarks> /// <param name="encountered">The assemblies encountered so far.</param> /// <param name="included">The assemblies included so far.</param> /// <param name="entry">The assembly to add.</param> internal static void AddAssembly( Set encountered, Set included, Assembly entry) { if (entry == null || encountered.contains(entry)) { return; } else { encountered.add(entry); } string simpleName = entry.GetName().Name; // ignored (performance optimization) if (simpleName == "System" || simpleName == "mscorlib" || simpleName == "Org.Hsqldb" || simpleName.StartsWith("System.") || simpleName.StartsWith("IKVM.") || simpleName.StartsWith("nunit.") || simpleName.StartsWith("TestDriven.")) { return; } else { included.add(entry); } try { Assembly satellite = entry.GetSatelliteAssembly(CultureInfo.CurrentCulture); IkvmResourceLoaderFactory.AddAssembly( encountered, included, satellite); } catch (Exception ex) { #if DEBUG Debug.WriteLine(ex); #endif } AssemblyName[] referencedAssemblies = entry.GetReferencedAssemblies(); for (int i = 0; i < referencedAssemblies.Length; i++) { AssemblyName assemblyName = referencedAssemblies[i]; try { Assembly referencedAssembly = Assembly.Load(assemblyName); IkvmResourceLoaderFactory.AddAssembly( encountered, included, referencedAssembly); } catch (System.Exception ex) { #if DEBUG Debug.WriteLine(ex); #endif } } }