Codota Logo
WildcardMatcher$SimpleWildcardMatcher
Code IndexAdd Codota to your IDE (free)

How to use
WildcardMatcher$SimpleWildcardMatcher
in
co.elastic.apm.agent.matcher

Best Java code snippets using co.elastic.apm.agent.matcher.WildcardMatcher$SimpleWildcardMatcher (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: elastic/apm-agent-java

return new SimpleWildcardMatcher(split[0], matcher.startsWith(WILDCARD), matcher.endsWith(WILDCARD), ignoreCase);
boolean isFirst = i == 0;
boolean isLast = i == split.length - 1;
matchers.add(new SimpleWildcardMatcher(split[i],
  !isFirst || matcher.startsWith(WILDCARD),
  !isLast || matcher.endsWith(WILDCARD),
origin: elastic/apm-agent-java

@Override
public boolean matches(String firstPart, @Nullable String secondPart) {
  int offset = 0;
  for (int i = 0; i < wildcardMatchers.size(); i++) {
    final SimpleWildcardMatcher matcher = wildcardMatchers.get(i);
    offset = matcher.indexOf(firstPart, secondPart, offset);
    if (offset == -1) {
      return false;
    }
    offset += matcher.matcher.length();
  }
  return true;
}
origin: elastic/apm-agent-java

int indexOf(String firstPart, @Nullable String secondPart, int offset) {
  if (secondPart == null) {
    secondPart = "";
  }
  int totalLength = firstPart.length() + secondPart.length();
  if (wildcardAtEnd && wildcardAtBeginning) {
    return indexOfIgnoreCase(firstPart, secondPart, matcher, ignoreCase, offset, totalLength);
  } else if (wildcardAtEnd) {
    return indexOfIgnoreCase(firstPart, secondPart, matcher, ignoreCase, 0, 1);
  } else if (wildcardAtBeginning) {
    return indexOfIgnoreCase(firstPart, secondPart, matcher, ignoreCase, totalLength - matcher.length(), totalLength);
  } else if (totalLength == matcher.length()) {
    return indexOfIgnoreCase(firstPart, secondPart, matcher, ignoreCase, 0, totalLength);
  } else {
    return -1;
  }
}
origin: elastic/apm-agent-java

@Test
void testCharAt() {
  assertSoftly(softly -> {
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(0, "foo", "bar", "foo".length())).isEqualTo('f');
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(1, "foo", "bar", "foo".length())).isEqualTo('o');
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(2, "foo", "bar", "foo".length())).isEqualTo('o');
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(3, "foo", "bar", "foo".length())).isEqualTo('b');
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(4, "foo", "bar", "foo".length())).isEqualTo('a');
    softly.assertThat(WildcardMatcher.SimpleWildcardMatcher.charAt(5, "foo", "bar", "foo".length())).isEqualTo('r');
  });
}
origin: elastic/apm-agent-java

@Override
public boolean matches(String s) {
  return indexOf(s, 0) != -1;
}
origin: elastic/apm-agent-java

@Override
public boolean matches(String s) {
  int offset = 0;
  for (int i = 0; i < wildcardMatchers.size(); i++) {
    final SimpleWildcardMatcher matcher = wildcardMatchers.get(i);
    offset = matcher.indexOf(s, offset);
    if (offset == -1) {
      return false;
    }
    offset += matcher.matcher.length();
  }
  return true;
}
origin: elastic/apm-agent-java

@Override
public boolean matches(String firstPart, @Nullable String secondPart) {
  return indexOf(firstPart, secondPart, 0) != -1;
}
origin: elastic/apm-agent-java

int indexOf(final String s, final int offset) {
  return indexOf(s, "", offset);
}
co.elastic.apm.agent.matcherWildcardMatcher$SimpleWildcardMatcher

Javadoc

This does not support wildcards in the middle of a matcher.

Most used methods

  • <init>
  • charAt
  • indexOf
  • indexOfIgnoreCase

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JPanel (javax.swing)
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now