Tabnine Logo
ColumnSortOption.<init>
Code IndexAdd Tabnine 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)

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

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • From CI to AI: The AI layer in your organization
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