code: private Collection<TokenPattern> getOrCreatePatterns(final String patternCode) {
          // first try the cheapest get(..) method
          final Collection<TokenPattern> patterns = _patterns.get(patternCode);
          if (patterns != null) {
              return patterns;
          }
  
          // then try the concurrent version which requires a collection
          final Collection<TokenPattern> newPatterns = new ArrayList<>(3);
          final Collection<TokenPattern> existingPatterns = _patterns.putIfAbsent(patternCode, newPatterns);
          if (existingPatterns == null) {
              return newPatterns;
          }
          return existingPatterns;
      }
docs: Gets a collection of known {@link TokenPattern}s that matches the pattern
  code
  
  @param patternCode
  @return