Tabnine Logo
FiltersSpecifier.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
org.batfish.datamodel.questions.FiltersSpecifier

Best Java code snippets using org.batfish.datamodel.questions.FiltersSpecifier.getType (Showing top 6 results out of 315)

origin: batfish/batfish

 @Override
 public FilterSpecifier buildFilterSpecifier(@Nullable Object input) {
  if (input == null) {
   return new ShorthandFilterSpecifier(FiltersSpecifier.ALL);
  }
  checkArgument(input instanceof String, "String input required for " + getName());
  FiltersSpecifier specifier = new FiltersSpecifier(input.toString().trim());
  checkArgument(specifier.getType() != Type.IPV6, "IPv6 is not currently supported");
  return new ShorthandFilterSpecifier(specifier);
 }
}
origin: batfish/batfish

@Test
public void constructorImplicitName() {
 FiltersSpecifier specifier = new FiltersSpecifier("acl.*");
 assertThat(specifier.getType(), equalTo(Type.NAME));
 assertThat(specifier.getRegex().pattern(), equalTo(Pattern.compile("acl.*").pattern()));
}
origin: batfish/batfish

@Test
public void constructorIpv4() {
 FiltersSpecifier specifier = new FiltersSpecifier("ipv4:secret.*");
 assertThat(specifier.getType(), equalTo(Type.IPV4));
 assertThat(specifier.getRegex().pattern(), equalTo(Pattern.compile("secret.*").pattern()));
}
origin: batfish/batfish

@Test
public void constructorExplicitName() {
 FiltersSpecifier specifier = new FiltersSpecifier("name:acl.*");
 assertThat(specifier.getType(), equalTo(Type.NAME));
 assertThat(specifier.getRegex().pattern(), equalTo(Pattern.compile("acl.*").pattern()));
}
origin: batfish/batfish

@Test
public void defaultWithColons() {
 String expression = "foo::bar::baz";
 FiltersSpecifier specifier = new FiltersSpecifier(expression);
 assertThat(specifier.getType(), is(Type.NAME));
 assertThat(specifier.getRegex().pattern(), equalTo(expression));
}
origin: batfish/batfish

 @Test
 public void nameWithColons() {
  String expression = "foo::bar::baz";
  FiltersSpecifier specifier = new FiltersSpecifier("name:" + expression);
  assertThat(specifier.getType(), is(Type.NAME));
  assertThat(specifier.getRegex().pattern(), equalTo(expression));
 }
}
org.batfish.datamodel.questionsFiltersSpecifiergetType

Popular methods of FiltersSpecifier

  • <init>
  • matches
    Evaluates if the given IPv4 filter matches this specifier
  • getRegex
  • isFilterOnInterface

Popular in Java

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
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