Tabnine Logo
Pattern.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
java.util.regex.Pattern

Best Java code snippets using java.util.regex.Pattern.toString (Showing top 20 results out of 3,555)

origin: google/guava

@Override
public String toString() {
 return pattern.toString();
}
origin: prestodb/presto

@Override
public String toString() {
 return pattern.toString();
}
origin: google/j2objc

@Override
public String toString() {
 return pattern.toString();
}
origin: SonarSource/sonarqube

 boolean hasSecondPattern() {
  return StringUtils.isNotEmpty(secondPattern.toString());
 }
}
origin: Atmosphere/atmosphere

/**
 * Construct a new URI pattern.
 *
 * @param regexPattern the regular expression pattern
 * @param groupIndexes the array of group indexes to capturing groups.
 * @throws IllegalArgumentException if the regexPattern is null.
 */
public UriPattern(Pattern regexPattern, int[] groupIndexes) {
  if (regexPattern == null)
    throw new IllegalArgumentException();
  this.regex = regexPattern.toString();
  this.regexPattern = regexPattern;
  this.groupIndexes = groupIndexes;
}
origin: stanfordnlp/CoreNLP

public Entry(List<Pattern> regex, String type, Set<String> overwritableTypes, double priority) {
 this.regex = regex;
 this.type = type.intern();
 this.overwritableTypes = overwritableTypes;
 this.priority = priority;
 // Efficiency shortcut
 for (Pattern p : regex) {
  if (p.toString().matches("[a-zA-Z0-9]+")) {
   exact.add(p.toString());
  } else {
   exact.add(null);
  }
 }
}
origin: prestodb/presto

private static void addNamedGroups(Pattern pattern, HashSet<String> variables)
{
  Matcher matcher = NAMED_GROUPS_PATTERN.matcher(pattern.toString());
  while (matcher.find()) {
    String name = matcher.group(1);
    checkArgument(!variables.contains(name), "Multiple definitions found for variable ${" + name + "}");
    variables.add(name);
  }
}
origin: apache/pulsar

public static List<String> topicsPatternFilter(List<String> original, Pattern topicsPattern) {
  final Pattern shortenedTopicsPattern = topicsPattern.toString().contains("://")
    ? Pattern.compile(topicsPattern.toString().split("\\:\\/\\/")[1]) : topicsPattern;
  return original.stream()
    .map(TopicName::get)
    .map(TopicName::toString)
    .filter(topic -> shortenedTopicsPattern.matcher(topic.split("\\:\\/\\/")[1]).matches())
    .collect(Collectors.toList());
}
origin: apache/hbase

@Override
public HTableDescriptor[] listTables(Pattern pattern) throws IOException {
 String regex = (pattern == null ? null : pattern.toString());
 return listTables(regex);
}
origin: apache/hbase

@Override
public HTableDescriptor[] listTables(Pattern pattern, boolean includeSysTables)
  throws IOException {
 String regex = (pattern == null ? null : pattern.toString());
 return listTables(regex, includeSysTables);
}
origin: apache/hbase

@Override
public TableName[] listTableNames(Pattern pattern, boolean includeSysTables) throws IOException {
 String regex = (pattern == null ? null : pattern.toString());
 return listTableNames(regex, includeSysTables);
}
origin: nutzam/nutz

@Override
public Object check(Object val) throws NutValidateException {
  if(null==val)
    return null;
  String s = val.toString();
  if (!p.matcher(s).find()) {
    throw new NutValidateException("InvalidString", p.toString(), s);
  }
  return val;
}
origin: stanfordnlp/CoreNLP

@Override
public String toString() {
 String result;
 switch(mode) {
 case FIXED:
  return label + '(' + children[0].toString() + ',' + newLabel + ')';
 case REGEX:
  return label + '(' + children[0].toString() + ',' + labelRegex.toString() + ',' + replacementString + ')';
 default:
  throw new AssertionError("Unsupported relabel mode " + mode);
 }
}
origin: apache/hbase

@Override
public List<TableDescriptor> listTableDescriptors(Pattern pattern, boolean includeSysTables)
  throws IOException {
 try {
  String regex = (pattern == null ? null : pattern.toString());
  List<TTableDescriptor> tTableDescriptors = client
    .getTableDescriptorsByPattern(regex, includeSysTables);
  return ThriftUtilities.tableDescriptorsFromThrift(tTableDescriptors);
 } catch (TException e) {
  throw new IOException(e);
 }
}
origin: neo4j/neo4j

  @Override
  public void describeTo( Description description )
  {
    description.appendText( "a string matching /" );
    description.appendText( pattern.toString() );
    description.appendText( "/" );
  }
}
origin: neo4j/neo4j

  @Override
  public void describeTo( Description description )
  {
    description.appendValue( SUCCESS )
        .appendText( format( " with metadata %s ~ %s", key, pattern.toString() ) );
  }
};
origin: immutables/immutables

@Override
public void write(JsonWriter out, Pattern value) throws IOException {
 if (value == null) {
  out.nullValue();
 } else if (out instanceof BsonWriter) {
  ((BsonWriter) out).unwrap()
      .writeRegularExpression(new BsonRegularExpression(value.pattern()));
 } else {
  out.value(value.toString());
 }
}
origin: apache/hbase

public static ListReplicationPeersRequest buildListReplicationPeersRequest(Pattern pattern) {
 ListReplicationPeersRequest.Builder builder = ListReplicationPeersRequest.newBuilder();
 if (pattern != null) {
  builder.setRegex(pattern.toString());
 }
 return builder.build();
}
origin: apache/hive

public static void validatePartitionNameCharacters(List<String> partVals,
                          Pattern partitionValidationPattern) throws MetaException {
 String invalidPartitionVal = getPartitionValWithInvalidCharacter(partVals, partitionValidationPattern);
 if (invalidPartitionVal != null) {
  throw new MetaException("Partition value '" + invalidPartitionVal +
    "' contains a character " + "not matched by whitelist pattern '" +
    partitionValidationPattern.toString() + "'.  " + "(configure with " +
    MetastoreConf.ConfVars.PARTITION_NAME_WHITELIST_PATTERN.getVarname() + ")");
 }
}
origin: pmd/pmd

@Override
public Object visit(ASTEnumConstant node, Object data) {
  // This inlines checkMatches because there's no variable declarator id
  if (!getProperty(enumConstantRegex).matcher(node.getImage()).matches()) {
    addViolation(data, node, new Object[]{
      "enum constant",
      node.getImage(),
      getProperty(enumConstantRegex).toString(),
    });
  }
  return data;
}
java.util.regexPatterntoString

Javadoc

Returns the string representation of this pattern. This is the regular expression from which this pattern was compiled.

Popular methods of Pattern

  • matcher
    Creates a matcher that will match the given input against this pattern.
  • compile
    Compiles the given regular expression into a pattern with the given flags.
  • quote
    Returns a literal pattern String for the specifiedString.This method produces a String that can be u
  • split
    Splits the given input sequence around matches of this pattern. The array returned by this method co
  • pattern
  • matches
    Compiles the given regular expression and attempts to match the given input against it. An invocatio
  • flags
    Returns this pattern's match flags.
  • splitAsStream
  • asPredicate
  • <init>
    This private constructor is used to create all Patterns. The pattern string and match flags are all
  • closeImpl
  • compileImpl
  • closeImpl,
  • compileImpl,
  • closure,
  • error,
  • escape,
  • RemoveQEQuoting,
  • accept,
  • addFlag,
  • append

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now