Tabnine Logo
IsLessThan.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
uk.gov.gchq.koryphe.impl.predicate.IsLessThan
constructor

Best Java code snippets using uk.gov.gchq.koryphe.impl.predicate.IsLessThan.<init> (Showing top 14 results out of 315)

origin: gchq/Gaffer

    .postAggregationFilter(new ElementFilter.Builder()
        .select(TestPropertyNames.COUNT)
        .execute(new IsLessThan(10))
        .build())
    .transformer(new ElementTransformer.Builder()
assertEquals(1, postFilterComponents.size());
assertArrayEquals(new String[]{TestPropertyNames.COUNT}, postFilterComponents.get(0).getSelection());
assertEquals(new IsLessThan(10), postFilterComponents.get(0).getPredicate());
origin: uk.gov.gchq.gaffer/doc

  public void isLessThanAString() {
    // ---------------------------------------------------------
    final IsLessThan function = new IsLessThan("B");
    // ---------------------------------------------------------

    runExample(function,
        null,
        1, "A", "B", "C");
  }
}
origin: uk.gov.gchq.gaffer/doc

public void isLessThanOrEqualTo5() {
  // ---------------------------------------------------------
  final IsLessThan function = new IsLessThan(5, true);
  // ---------------------------------------------------------
  runExample(function,
      null,
      1, 1L, 5, 5L, 10, 10L, "1");
}
origin: uk.gov.gchq.gaffer/doc

public void isLessThan5() {
  // ---------------------------------------------------------
  final IsLessThan function = new IsLessThan(5);
  // ---------------------------------------------------------
  runExample(function,
      null,
      1, 1L, 5, 5L, 10, 10L, "1");
}
origin: uk.gov.gchq.gaffer/doc

public void isLessThanALong5() {
  // ---------------------------------------------------------
  final IsLessThan function = new IsLessThan(5L);
  // ---------------------------------------------------------
  runExample(function,
      null,
      1, 1L, 5, 5L, 10, 10L, "1");
}
origin: uk.gov.gchq.gaffer/doc

public void isLessThan3AndIsMoreThan0() {
  // ---------------------------------------------------------
  final And function = new And<>(
      new IsLessThan(3),
      new IsMoreThan(0)
  );
  // ---------------------------------------------------------
  runExample(function,
      null,
      0, 1, 2, 3, 1L, 2L);
}
origin: uk.gov.gchq.gaffer/doc

public void isLessThan2EqualTo5OrIsMoreThan10() {
  // ---------------------------------------------------------
  final Or function = new Or<>(
      new IsLessThan(2),
      new IsEqual(5),
      new IsMoreThan(10)
  );
  // ---------------------------------------------------------
  runExample(function,
      "When using an Or predicate with a single selected value you can just use the constructor new Or(predicates))'",
      1, 2, 3, 5, 15, 1L, 3L, 5L);
}
origin: uk.gov.gchq.gaffer/spark-library

} else if (filter instanceof LessThan) {
  final LessThan lessThan = (LessThan) filter;
  final Predicate<?> isLessThan = new IsLessThan((Comparable<?>) lessThan.value(), false);
  final Set<String> relevantGroups = getGroupsFromFilter(filter);
  if (null != relevantGroups) {
} else if (filter instanceof LessThanOrEqual) {
  final LessThanOrEqual lessThan = (LessThanOrEqual) filter;
  final Predicate<?> isLessThan = new IsLessThan((Comparable<?>) lessThan.value(), true);
  final Set<String> relevantGroups = getGroupsFromFilter(filter);
  if (null != relevantGroups) {
origin: uk.gov.gchq.gaffer/doc

public CloseableIterable<? extends Element> getEntitiesRelatedTo2WithCountLessThan2OrMoreThan5() {
  // ---------------------------------------------------------
  final GetElements operation = new GetElements.Builder()
      .input(new EntitySeed(2), new EdgeSeed(2, 3, DirectedType.EITHER))
      .view(new View.Builder()
          .entity("entity", new ViewElementDefinition.Builder()
              .preAggregationFilter(
                  new ElementFilter.Builder()
                      .select("count")
                      .execute(new Or<>(new IsLessThan(2), new IsMoreThan(5)))
                      .build())
              .build())
          .build())
      .build();
  // ---------------------------------------------------------
  return runExample(operation,
      "When using an Or predicate with a single selected value you can just do 'select(propertyName)' then 'execute(new Or(predicates))'");
}
origin: uk.gov.gchq.gaffer/doc

  public void firstItemIsLessThan2AndSecondItemIsMoreThan5() {
    // ---------------------------------------------------------
    final And function = new And.Builder()
        .select(0)
        .execute(new IsLessThan(2))
        .select(1)
        .execute(new IsMoreThan(5))
        .build();
    // ---------------------------------------------------------

    runExample(function,
        null,
        new Tuple2<>(1, 10),
        new Tuple2<>(1, 1),
        new Tuple2<>(10, 10),
        new Tuple2<>(10, 1),
        new Tuple2<>(1L, 10L),
        new Tuple1<>(1));
  }
}
origin: uk.gov.gchq.gaffer/doc

  public void firstItemIsLessThan2OrSecondItemIsMoreThan10() {
    // ---------------------------------------------------------
    final Or function = new Or.Builder()
        .select(0)
        .execute(new IsLessThan(2))
        .select(1)
        .execute(new IsMoreThan(10))
        .build();
    // ---------------------------------------------------------

    runExample(function,
        "When using an Or predicate with multiple selected values, you need to use the Or.Builder to build your Or predicate, using .select() then .execute(). " +
            "When selecting values in the Or.Builder you need to refer to the position in the input array. I.e to use the first value use position 0 - select(0)." +
            "You can select multiple values to give to a predicate like isXLessThanY, this is achieved by passing 2 positions to the selec method - select(0, 1)",
        new Tuple2<>(1, 15),
        new Tuple2<>(1, 1),
        new Tuple2<>(15, 15),
        new Tuple2<>(15, 1),
        new Tuple2<>(1L, 15L),
        new Tuple1<>(1));
  }
}
origin: uk.gov.gchq.gaffer/doc

  public CloseableIterable<? extends Element> getEdgesRelatedTo2WhenSourceIsLessThan2OrDestinationIsMoreThan3() {
    // ---------------------------------------------------------
    final GetElements operation = new GetElements.Builder()
        .input(new EntitySeed(2))
        .view(new View.Builder()
            .edge("edge", new ViewElementDefinition.Builder()
                .preAggregationFilter(
                    new ElementFilter.Builder()
                        .select(IdentifierType.SOURCE.name(), IdentifierType.DESTINATION.name())
                        .execute(new Or.Builder<>()
                            .select(0)
                            .execute(new IsLessThan(2))
                            .select(1)
                            .execute(new IsMoreThan(3))
                            .build())
                        .build())
                .build())
            .build())
        .build();
    // ---------------------------------------------------------

    return runExample(operation,
        "When using an Or predicate with a multiple selected values, it is more complicated. " +
            "First, you need to select all the values you want: 'select(a, b, c)'. This will create an array of the selected values, [a, b, c]. " +
            "You then need to use the Or.Builder to build your Or predicate, using .select() then .execute(). " +
            "When selecting values in the Or.Builder you need to refer to the position in the [a,b,c] array. So to use property 'a', use position 0 - select(0).");
  }
}
origin: uk.gov.gchq.gaffer/doc

.execute(new IsMoreThan(MAY_01_2000, true))
.select("endDate")
.execute(new IsLessThan(MAY_02_2000, false))
.build()
.execute(new IsMoreThan(MAY_01_2000, true))
.select("endDate")
.execute(new IsLessThan(MAY_03_2000, false))
.build()
origin: uk.gov.gchq.gaffer/doc

    .execute(new IsMoreThan(JAN_01_2000, true))
    .select("endDate")
    .execute(new IsLessThan(JAN_01_2001, false))
    .build())
.postAggregationFilter(new ElementFilter.Builder()
uk.gov.gchq.koryphe.impl.predicateIsLessThan<init>

Popular methods of IsLessThan

  • getControlValue
  • getOrEqualTo

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • getContentResolver (Context)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JPanel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Github Copilot alternatives
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