Codota Logo
ColumnSortOption.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.batfish.common.ColumnSortOption
constructor

Best Java code snippets using org.batfish.common.ColumnSortOption.<init> (Showing top 16 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: batfish/batfish

@JsonCreator
private static @Nonnull ColumnSortOption create(
  @JsonProperty(BfConsts.PROP_COLUMN) String column,
  @JsonProperty(BfConsts.PROP_REVERSED) Boolean reversed) {
 return new ColumnSortOption(requireNonNull(column), firstNonNull(reversed, false));
}
origin: batfish/batfish

 @Test
 public void testEquals() {
  ColumnSortOption group1Elem1 = new ColumnSortOption("a", false);
  ColumnSortOption group1Elem2 = new ColumnSortOption("a", false);
  ColumnSortOption group2Elem1 = new ColumnSortOption("a", true);
  ColumnSortOption group3Elem1 = new ColumnSortOption("b", false);

  new EqualsTester()
    .addEqualityGroup(group1Elem1, group1Elem2)
    .addEqualityGroup(group2Elem1)
    .addEqualityGroup(group3Elem1)
    .testEquals();
 }
}
origin: batfish/batfish

@Test
public void testProcessAnswerRowsNotFound() throws IOException {
 String columnName = "issue";
 int maxRows = 1;
 int rowOffset = 0;
 AnswerRowsOptions options =
   new AnswerRowsOptions(
     ImmutableSet.of(columnName),
     ImmutableList.of(),
     maxRows,
     rowOffset,
     ImmutableList.of(new ColumnSortOption(columnName, true)),
     false);
 Answer processedAnswer = _manager.processAnswerRows(null, options);
 assertThat(processedAnswer.getStatus(), equalTo(AnswerStatus.NOTFOUND));
}
origin: batfish/batfish

@Test
public void testProcessAnswerRowsFailure() throws IOException {
 String columnName = "issue";
 int maxRows = 1;
 int rowOffset = 0;
 AnswerRowsOptions options =
   new AnswerRowsOptions(
     ImmutableSet.of(columnName),
     ImmutableList.of(),
     maxRows,
     rowOffset,
     ImmutableList.of(new ColumnSortOption(columnName, true)),
     false);
 Answer badInput = new Answer();
 badInput.setStatus(AnswerStatus.SUCCESS);
 String rawAnswerStr = BatfishObjectMapper.writePrettyString(badInput);
 Answer processedAnswer = _manager.processAnswerRows(rawAnswerStr, options);
 assertThat(processedAnswer.getStatus(), equalTo(AnswerStatus.FAILURE));
}
origin: batfish/batfish

@Test
public void testProcessAnswerRowsStale() throws IOException {
 String columnName = "issue";
 int maxRows = 1;
 int rowOffset = 0;
 AnswerRowsOptions options =
   new AnswerRowsOptions(
     ImmutableSet.of(columnName),
     ImmutableList.of(),
     maxRows,
     rowOffset,
     ImmutableList.of(new ColumnSortOption(columnName, true)),
     false);
 Answer badInput = new Answer();
 badInput.setStatus(AnswerStatus.STALE);
 String rawAnswerStr = BatfishObjectMapper.writePrettyString(badInput);
 Answer processedAnswer = _manager.processAnswerRows(rawAnswerStr, options);
 assertThat(processedAnswer.getStatus(), equalTo(AnswerStatus.STALE));
}
origin: batfish/batfish

    1,
    2,
    ImmutableList.of(new ColumnSortOption("c", false)),
    false);
AnswerRowsOptions group1Elem2 =
    1,
    2,
    ImmutableList.of(new ColumnSortOption("c", false)),
    false);
AnswerRowsOptions group2Elem1 =
    1,
    2,
    ImmutableList.of(new ColumnSortOption("c", false)),
    false);
AnswerRowsOptions group3Elem1 =
    1,
    2,
    ImmutableList.of(new ColumnSortOption("c", false)),
    false);
AnswerRowsOptions group4Elem1 =
    3,
    2,
    ImmutableList.of(new ColumnSortOption("c", false)),
    false);
AnswerRowsOptions group5Elem1 =
origin: batfish/batfish

    new ColumnMetadata(col2, Schema.INTEGER, "bloop"));
Comparator<Row> comCol1 =
  _manager.buildComparator(rawColumnMap, ImmutableList.of(new ColumnSortOption(col1, false)));
Comparator<Row> comCol1Reversed =
  _manager.buildComparator(rawColumnMap, ImmutableList.of(new ColumnSortOption(col1, true)));
Comparator<Row> comCol2 =
  _manager.buildComparator(rawColumnMap, ImmutableList.of(new ColumnSortOption(col2, false)));
Comparator<Row> comCol2Reversed =
  _manager.buildComparator(rawColumnMap, ImmutableList.of(new ColumnSortOption(col2, true)));
Comparator<Row> comCol1Then2 =
  _manager.buildComparator(
    rawColumnMap,
    ImmutableList.of(new ColumnSortOption(col1, false), new ColumnSortOption(col2, false)));
Comparator<Row> comCol2Then1 =
  _manager.buildComparator(
    rawColumnMap,
    ImmutableList.of(new ColumnSortOption(col2, false), new ColumnSortOption(col1, false)));
origin: batfish/batfish

    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, false)),
    false);
AnswerRowsOptions optionsSortingReverse =
    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, true)),
    false);
origin: batfish/batfish

    maxRows,
    rowOffset,
    ImmutableList.of(new ColumnSortOption(columnName, true)),
    false);
Map<String, AnswerRowsOptions> analysisAnswersOptions = ImmutableMap.of(questionName, options);
origin: batfish/batfish

@Test
public void testProcessAnswerRows2() throws IOException {
 String columnName = "issue";
 int maxRows = 1;
 int rowOffset = 0;
 TableAnswerElement table =
   new TableAnswerElement(
     new TableMetadata(
       ImmutableList.of(new ColumnMetadata(columnName, Schema.ISSUE, "foobar"))));
 table.addRow(Row.of(columnName, new Issue("blah", 5, new Issue.Type("m", "n"))));
 Answer answer = new Answer();
 answer.addAnswerElement(table);
 answer.setStatus(AnswerStatus.SUCCESS);
 String answerStr = BatfishObjectMapper.writePrettyString(answer);
 AnswerRowsOptions options =
   new AnswerRowsOptions(
     ImmutableSet.of(columnName),
     ImmutableList.of(),
     maxRows,
     rowOffset,
     ImmutableList.of(new ColumnSortOption(columnName, true)),
     false);
 List<Row> processedRows =
   ((TableView) _manager.processAnswerRows2(answerStr, options).getAnswerElements().get(0))
     .getInnerRows();
 assertThat(processedRows, equalTo(table.getRowsList()));
}
origin: batfish/batfish

@Test
public void testProcessAnswerRows() throws IOException {
 String columnName = "issue";
 int maxRows = 1;
 int rowOffset = 0;
 TableAnswerElement table =
   new TableAnswerElement(
     new TableMetadata(
       ImmutableList.of(new ColumnMetadata(columnName, Schema.ISSUE, "foobar"))));
 table.addRow(Row.of(columnName, new Issue("blah", 5, new Issue.Type("m", "n"))));
 Answer answer = new Answer();
 answer.addAnswerElement(table);
 answer.setStatus(AnswerStatus.SUCCESS);
 String answerStr = BatfishObjectMapper.writePrettyString(answer);
 AnswerRowsOptions options =
   new AnswerRowsOptions(
     ImmutableSet.of(columnName),
     ImmutableList.of(),
     maxRows,
     rowOffset,
     ImmutableList.of(new ColumnSortOption(columnName, true)),
     false);
 List<Row> processedRows =
   ((TableAnswerElement)
       _manager.processAnswerRows(answerStr, options).getAnswerElements().get(0))
     .getRowsList();
 assertThat(processedRows, equalTo(table.getRowsList()));
}
origin: batfish/batfish

      Integer.MAX_VALUE,
      0,
      ImmutableList.of(new ColumnSortOption(columnName, false)),
      false));
String analysisAnswersOptionsStr =
origin: batfish/batfish

    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, false)),
    false);
String answerRowsOptionsStr = BatfishObjectMapper.writePrettyString(answersRowsOptions);
origin: batfish/batfish

    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, false)),
    false);
String answerRowsOptionsStr = BatfishObjectMapper.writePrettyString(answersRowsOptions);
origin: batfish/batfish

    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, false)),
    false);
String answerRowsOptionsStr = BatfishObjectMapper.writePrettyString(answersRowsOptions);
origin: batfish/batfish

    Integer.MAX_VALUE,
    0,
    ImmutableList.of(new ColumnSortOption(columnName, false)),
    false);
String answerRowsOptionsStr = BatfishObjectMapper.writePrettyString(answersRowsOptions);
org.batfish.commonColumnSortOption<init>

Popular methods of ColumnSortOption

  • getColumn
  • getReversed

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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