congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IpIpSpace
Code IndexAdd Tabnine to your IDE (free)

How to use
IpIpSpace
in
org.batfish.datamodel

Best Java code snippets using org.batfish.datamodel.IpIpSpace (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: batfish/batfish

@Override
public Boolean visitIpIpSpace(IpIpSpace ipIpSpace) {
 return _ipWildcard.containsIp(ipIpSpace.getIp());
}
origin: batfish/batfish

public IpIpSpace toIpSpace() {
 return new IpIpSpace(this);
}
origin: batfish/batfish

@Test
public void resolveIpSpaceOfLocationTestDefault() {
 SpecifiersQuestion question = new SpecifiersQuestion(QueryType.IP_SPACE);
 assertThat(
   resolveIpSpaceOfLocation(question, _context).getRows().getData(),
   equalTo(
     ImmutableMultiset.of(
       Row.of(
         COL_LOCATIONS,
         ImmutableSet.of(new InterfaceLocation(_c1.getHostname(), _iface1.getName()))
           .toString(),
         COL_IP_SPACE,
         _iface1.getAddress().getIp().toIpSpace().toString()),
       Row.of(
         COL_LOCATIONS,
         ImmutableSet.of(new InterfaceLocation(_c2.getHostname(), _iface2.getName()))
           .toString(),
         COL_IP_SPACE,
         _iface2.getAddress().getIp().toIpSpace().toString()))));
}
origin: batfish/batfish

@Test
public void testIpSpaceReference() {
 Ip ip = Ip.parse("1.1.1.1");
 Map<String, IpSpace> namedIpSpaces = ImmutableMap.of("foo", ip.toIpSpace());
 IpSpace reference = new IpSpaceReference("foo");
 IpSpaceToBDD ipSpaceToBDD = new IpSpaceToBDD(_ipAddrBdd, namedIpSpaces);
 BDD ipBDD = ip.toIpSpace().accept(ipSpaceToBDD);
 BDD referenceBDD = reference.accept(ipSpaceToBDD);
 assertThat(referenceBDD, equalTo(ipBDD));
}
origin: batfish/batfish

 @Test
 public void testComplement() {
  IpSpace ipSpace = Ip.parse("1.1.1.1").toIpSpace().complement();
  assertThat(ipSpace, not(containsIp(Ip.parse("1.1.1.1"))));
  assertThat(ipSpace, containsIp(Ip.parse("1.2.3.4")));
 }
}
origin: batfish/batfish

@Test
public void resolveIpSpaceOfLocationTest() {
 SpecifiersQuestion questionWithLocation =
   new SpecifiersQuestion(QueryType.IP_SPACE_OF_LOCATION);
 questionWithLocation.setLocationSpecifierInput(_c1.getHostname());
 // only c1:iface1 should be present
 assertThat(
   resolveIpSpaceOfLocation(questionWithLocation, _context).getRows().getData(),
   equalTo(
     ImmutableMultiset.of(
       Row.of(
         COL_LOCATIONS,
         ImmutableSet.of(new InterfaceLocation(_c1.getHostname(), _iface1.getName()))
           .toString(),
         COL_IP_SPACE,
         _iface1.getAddress().getIp().toIpSpace().toString()))));
}
origin: batfish/batfish

@Override
public Void visitIpIpSpace(IpIpSpace ipIpSpace) {
 _prefixes.add(Prefix.create(ipIpSpace.getIp(), Prefix.MAX_PREFIX_LENGTH));
 return null;
}
origin: batfish/batfish

@Override
public BDD visitIpIpSpace(IpIpSpace ipIpSpace) {
 return toBDD(ipIpSpace.getIp());
}
origin: batfish/batfish

@Override
public Boolean visitIpIpSpace(IpIpSpace ipIpSpace) {
 return _ipWildcard.containsIp(ipIpSpace.getIp());
}
origin: batfish/batfish

@Override
public IpSpace visitIpIpSpace(IpIpSpace ipIpSpace) {
 return specialize(ipIpSpace.getIp());
}
origin: batfish/batfish

@Override
public BooleanExpr visitIpIpSpace(IpIpSpace ipIpSpace) {
 Ip ip = ipIpSpace.getIp();
 return matchAnyField(field -> HeaderSpaceMatchExpr.matchIp(ip, field));
}
origin: batfish/batfish

@Override
public String visitIpIpSpace(IpIpSpace ipIpSpace) {
 String metadataDescription = computeMetadataDescription(ipIpSpace);
 if (metadataDescription != null) {
  return metadataDescription;
 }
 return ipIpSpace.getIp().toString();
}
origin: batfish/batfish

@Override
public Boolean visitIpIpSpace(IpIpSpace ipIpSpace) {
 return !new IpWildcard(ipIpSpace.getIp()).equals(_ipWildcard);
}
origin: batfish/batfish

@Override
public BoolExpr visitIpIpSpace(IpIpSpace ipIpSpace) {
 return _context.mkEq(_var, _context.mkBV(ipIpSpace.getIp().asLong(), 32));
}
org.batfish.datamodelIpIpSpace

Most used methods

  • getIp
  • <init>
  • accept
  • complement
  • toString

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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