method to get all polymers for one specific polymer type

@param str specific polymer type
@param polymers List of PolymerNotation
@return List of PolymerNotation with the specific type
6303
public static List<PolymerNotation> getListOfPolymersSpecificType(String str, List<PolymerNotation> polymers) {
    List<PolymerNotation> list = new ArrayList<PolymerNotation>();
    for (PolymerNotation polymer : polymers) {
      if (polymer.getPolymerID().getType().equals(str)) {
        list.add(polymer);
      }
    }
    return list;
  }
459166
public static List<Chain> getRepresentativeAtomsOnly(List<Chain> chains){
		List<Chain> newChains = new ArrayList<Chain>();

		for (Chain chain : chains){
			Chain newChain = getRepresentativeAtomsOnly(chain);
			newChains.add(newChain);
		}

		return newChains;
	}
950285
public static List<String> split(
                    final String str
                    )
    {
        String  s = str;
        if (s != null) {
            s = s.trim();
        }

        List<String>  list = new ArrayList<String>();
        if (s == null || s.length() == 0) {
            return list;
        }

        String[]  tokens = s.split( "[ \t\n\r\f]" );
        // NOTE: tokens[i] may be an empty string "".

        // excludes empty strings.
        for (String  t : tokens) {
            if (t.length() > 0) {
                list.add( t );
            }
        }

        return list;
    }
404654
public List<NodeValue<K, V>> getRepairs(List<NodeValue<K, V>> nodeValues) {
        int size = nodeValues.size();
        if(size <= 1)
            return Collections.emptyList();

        Map<K, List<NodeValue<K, V>>> keyToNodeValues = Maps.newHashMap();
        for(NodeValue<K, V> nodeValue: nodeValues) {
            List<NodeValue<K, V>> keyNodeValues = keyToNodeValues.get(nodeValue.getKey());
            if(keyNodeValues == null) {
                keyNodeValues = Lists.newArrayListWithCapacity(5);
                keyToNodeValues.put(nodeValue.getKey(), keyNodeValues);
            }
            keyNodeValues.add(nodeValue);
        }

        List<NodeValue<K, V>> result = Lists.newArrayList();
        for(List<NodeValue<K, V>> keyNodeValues: keyToNodeValues.values())
            result.addAll(singleKeyGetRepairs(keyNodeValues));
        return result;
    }
889363
def collect_by_type(self, typ):
        '''
        '''
        nodes = []
        if isinstance(self, typ):
            nodes.append(self)
        for c in self:
            nodes.extend(c.collect_by_type(typ))
        return nodes
28069
def get_all_conversion_chains_to_type(self, to_type: Type[Any])\
            -> Tuple[List[Converter], List[Converter], List[Converter]]:
        
        return self.get_all_conversion_chains(to_type=to_type)
1044695
public final static PolymerNotation removeAnnotationOfPolmyer(PolymerNotation polymer) {
		return new PolymerNotation(polymer.getPolymerID(), polymer.getPolymerElements(), null);
	}
343755
public static List<EntityInfo> findPolyEntities(List<List<Chain>> polyModels) {
		TreeMap<String,EntityInfo> chainIds2entities = findEntitiesFromAlignment(polyModels);

		List<EntityInfo> entities = findUniqueEntities(chainIds2entities);

		return entities;
	}
959598
public IRingSet getAllRings() throws NoSuchAtomException {
        IRingSet ringset = getBasicRings();
        IRing newring;

        int nBasicRings = ringset.getAtomContainerCount();
        for (int i = 0; i < nBasicRings; i++)
            getBondsInRing(molecule, (IRing) ringset.getAtomContainer(i), cb[i]);

        for (int i = 0; i < nBasicRings; i++) {
            for (int j = i + 1; j < nBasicRings; j++) {
                //logger.debug("combining rings "+(i+1)+","+(j+1));
                newring = combineRings(ringset, i, j);
                //newring = combineRings((Ring)ringset.get(i),(Ring)ringset.get(j));
                if (newring != null) ringset.addAtomContainer(newring);
            }
        }

        return ringset;
    }
662609
public static final int getTotalMonomerCount(HELM2Notation helm2notation) {
    int result = 0;
    for (PolymerNotation polymer : helm2notation.getListOfPolymers()) {
      result += PolymerUtils.getTotalMonomerCount(polymer);
    }
    return result;
  }
1189906
@Override
    public synchronized ChainGroupData[] getAllChainGroups(String chainName) throws ChainException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getAllChainGroups chainName=" + chainName);
        }
        if (null == chainName) {
            throw new InvalidChainNameException("Null chain name");
        }

        // Ensure the chain exists.
        ChainData chain = this.chainDataMap.get(chainName);
        if (null == chain) {
            throw new ChainException("Unable to find chain: " + chainName);
        }

        int index = 0;
        int numGroups = getNumGroupsUsingChain(chainName);
        ChainGroupData[] groupArray = new ChainGroupData[numGroups];
        for (ChainGroupData group : this.chainGroups.values()) {
            if (group.containsChain(chainName)) {
                groupArray[index++] = group;
            }
        }
        return groupArray;
    }
1327580
private List<Integer> getBondNosForRingGroup(IAtomContainer molecule, List<Integer> ringGroup, IRingSet ringSet) {
        List<Integer> btc = new ArrayList<Integer>();
        for (Integer i : ringGroup) {
            for (IBond bond : ringSet.getAtomContainer(i).bonds()) {
                if (btc.size() > 0) {
                    if (!btc.contains(molecule.indexOf(bond))) {
                        btc.add(molecule.indexOf(bond));
                    }
                } else {
                    btc.add(molecule.indexOf(bond));
                }
            }
        }
        return btc;
    }
1118773
public static TreeSet<CharType> getTypeSet(String str) {
		CharType[] tag = getType(str);
		TreeSet<CharType> set = new TreeSet<CharType>();
		for(int i=0;i<tag.length;i++){
			set.add(tag[i]);			
		}	
		return set;
	}
799901
public static List<String> split(
                    final String str
                    )
    {
        String  s = str;
        if (s != null) {
            s = s.trim();
        }

        List<String>  list = new ArrayList<String>();
        if (s == null || s.length() == 0) {
            return list;
        }

        String[]  tokens = s.split( "[ \t\n\r\f]" );
        // NOTE: tokens[i] may be an empty string "".

        // excludes empty strings.
        int  n_tokens = tokens.length;
        for (int  i = 0; i < n_tokens; i++) {
            if (tokens[i].length() > 0) {
                list.add( tokens[i] );
            }
        }

        return list;
    }
1278836
function extractInline($) {
  var scripts = [];
  $('script:not([src])').each(function() {
    var el  = $(this);
    var src = el.text();
    var closestPolymerElement = el.closest('polymer-element');
    if(closestPolymerElement.length) {
      src = fixPolymerInvocation(src, $(closestPolymerElement).attr('name'))
    }
    scripts.push(src);
    el.remove();
  })
  return scripts;
}
497359
public Monomer getBaseMonomer(MonomerStore monomerStore) {

    String baseSymbol = getBaseSymbol();
    if (baseSymbol != null && !baseSymbol.equalsIgnoreCase("")) {
      try {
        Map<String, Monomer> monomers = monomerStore.getMonomers(Monomer.NUCLIEC_ACID_POLYMER_TYPE);
        Monomer m = monomers.get(baseSymbol);
        return m;
      } catch (Exception ex) {
        LOG.info("Unable to get base monomer for "
            + baseSymbol);
        return null;
      }
    } else {
      return null;
    }

  }
1341905
public static List<String> getAllIDs(IReactionScheme scheme) {
        List<String> IDlist = new ArrayList<String>();
        if (scheme.getID() != null) IDlist.add(scheme.getID());
        for (IReaction reaction : scheme.reactions()) {
            IDlist.addAll(ReactionManipulator.getAllIDs(reaction));
        }
        if (scheme.getReactionSchemeCount() != 0) for (IReactionScheme rs : scheme.reactionSchemes()) {
            IDlist.addAll(getAllIDs(rs));
        }
        return IDlist;
    }