Tabnine Logo
Since
Code IndexAdd Tabnine to your IDE (free)

How to use
Since
in
uk.gov.gchq.koryphe

Best Java code snippets using uk.gov.gchq.koryphe.Since (Showing top 20 results out of 315)

origin: gchq/Gaffer

@Since("1.0.0")
public class HllSketchIsLessThan extends KoryphePredicate<HllSketch> {
  private long controlValue;
origin: gchq/Gaffer

/**
 * A {@code ToFreqMap} is a {@link KorypheFunction} that
 * creates a new FreqMap and upserts a given value.
 */
@Since("1.8.0")
@Summary("Creates a new FreqMap and upserts a given value")
public class ToFreqMap extends KorypheFunction<Object, FreqMap> {
  @Override
  public FreqMap apply(final Object value) {
    return new FreqMap(null != value ? value.toString() : null);
  }
}

origin: gchq/Gaffer

/**
 * An {@code UnwrapVertex} is a {@link KorypheFunction} for unwrapping {@link EntityId}s.
 * If the input is an EntityId the vertex is extracted, otherwise the original
 * value is returned.
 */
@Since("1.5.0")
@Summary("Extracts the the vertex from an entityId")
public class UnwrapEntityId extends KorypheFunction<Object, Object> {
  @Override
  public Object apply(final Object item) {
    return null != item ? item instanceof EntityId ? ((EntityId) item).getVertex() : item : null;
  }
}

origin: gchq/Gaffer

/**
 * A {@code ToTypeSubTypeValue} is a {@link KorypheFunction} that converts a
 * value into a {@link TypeSubTypeValue}, by setting the Type and SubType to null
 * and the Value to the input value.
 */
@Since("1.8.0")
@Summary("Converts a value into a TypeSubTypeValue")
public class ToTypeSubTypeValue extends KorypheFunction<Object, TypeSubTypeValue> {
  @Override
  public TypeSubTypeValue apply(final Object value) {
    return new TypeSubTypeValue(null, null, null != value ? value.toString() : null);
  }
}

origin: gchq/Gaffer

/**
 * A {@code LongsSketchAggregator} is a {@link java.util.function.BinaryOperator} that takes in
 * {@link LongsSketch}s and merges them together using {@link LongsSketch#merge(LongsSketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates LongSketches objects")
public class LongsSketchAggregator extends KorypheBinaryOperator<LongsSketch> {

  @Override
  protected LongsSketch _apply(final LongsSketch a, final LongsSketch b) {
    a.merge(b);
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code ToTypeValue} is a {@link KorypheFunction} that converts a
 * value into a {@link TypeValue}, by setting the Type to null
 * and the Value to the input value.
 */
@Since("1.8.0")
@Summary("Converts a value into a TypeValue")
public class ToTypeValue extends KorypheFunction<Object, TypeValue> {
  @Override
  public TypeValue apply(final Object value) {
    return new TypeValue(null, null != value ? value.toString() : null);
  }
}

origin: gchq/Gaffer

/**
 * An {@code ExtractGroup} is a {@link KorypheFunction} for
 * extracting a group from an {@link Element}.
 * If the Element is null, this function will return null.
 */
@Since("1.4.0")
@Summary("Extracts a group from an element")
public class ExtractGroup extends KorypheFunction<Element, String> {
  @Override
  public String apply(final Element element) {
    return null != element ? element.getGroup() : null;
  }
}

origin: gchq/Gaffer

/**
 * Aggregator for {@link RoaringBitmap} objects.
 * Bitmaps are aggregated using a bitwise OR operation.
 */
@Since("1.0.0")
@Summary("Aggregates RoaringBitmaps")
public class RoaringBitmapAggregator extends KorypheBinaryOperator<RoaringBitmap> {
  @Override
  protected RoaringBitmap _apply(final RoaringBitmap a, final RoaringBitmap b) {
    a.or(b);
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code KllFloatsSketchAggregator} is a {@link KorypheBinaryOperator} that aggregates
 * {@link KllFloatsSketch}s.
 */
@Since("1.4.0")
@Summary("Aggregates KllFloatsSketches")
public class KllFloatsSketchAggregator extends KorypheBinaryOperator<KllFloatsSketch> {

  @Override
  protected KllFloatsSketch _apply(final KllFloatsSketch a, final KllFloatsSketch b) {
    a.merge(b);
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code UnionAggregator} is a {@link java.util.function.BinaryOperator} that aggregates {@link Union}s.
 * It does this by extracting a {@link com.yahoo.sketches.theta.CompactSketch} from each {@link Union}
 * and merges that using {@link Union#update(com.yahoo.sketches.theta.Sketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates Unions")
public class UnionAggregator extends KorypheBinaryOperator<Union> {

  @Override
  protected Union _apply(final Union a, final Union b) {
    a.update(b.getResult());
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code StringsUnionAggregator} is a {@link java.util.function.BinaryOperator} that aggregates {@link ItemsUnion}s
 * of {@link String}s. It does this by extracting a {@link com.yahoo.sketches.quantiles.ItemsSketch} from each
 * {@link ItemsUnion} and merges that using {@link ItemsUnion#update(com.yahoo.sketches.quantiles.ItemsSketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates ItemUnions of Strings")
public class StringsUnionAggregator extends KorypheBinaryOperator<ItemsUnion<String>> {

  @Override
  protected ItemsUnion<String> _apply(final ItemsUnion<String> a, final ItemsUnion<String> b) {
    a.update(b.getResult());
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code HllUnionAggregator} is a {@link java.util.function.BinaryOperator} that takes in
 * {@link com.yahoo.sketches.hll.Union}s and merges them together using
 * {@link Union#update(com.yahoo.sketches.hll.HllSketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates HllUnions objects")
public class HllUnionAggregator extends KorypheBinaryOperator<Union> {

  @Override
  protected Union _apply(final Union a, final Union b) {
    a.update(b.getResult());
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code DoublesUnionAggregator} is a {@link java.util.function.BinaryOperator} that aggregates {@link DoublesUnion}s.
 * It does this by extracting a {@link com.yahoo.sketches.quantiles.DoublesSketch} from each {@link DoublesUnion}
 * and merges that using {@link DoublesUnion#update(com.yahoo.sketches.quantiles.DoublesSketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates DoublesUnions")
public class DoublesUnionAggregator extends KorypheBinaryOperator<DoublesUnion> {

  @Override
  protected DoublesUnion _apply(final DoublesUnion a, final DoublesUnion b) {
    a.update(b.getResult());
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code ReservoirItemsSketchAggregator} is a {@link java.util.function.BinaryOperator} that aggregates
 * {@link ReservoirItemsSketch}s using a {@link ReservoirItemsUnion}.
 */
@Since("1.0.0")
@Summary("Aggregates ReservoirItemsSketches")
public class ReservoirItemsSketchAggregator<T> extends KorypheBinaryOperator<ReservoirItemsSketch<T>> {

  @Override
  protected ReservoirItemsSketch<T> _apply(final ReservoirItemsSketch<T> a, final ReservoirItemsSketch<T> b) {
    final ReservoirItemsUnion<T> union = ReservoirItemsUnion.newInstance(a.getK());
    union.update(a);
    union.update(b);
    return union.getResult();
  }
}

origin: gchq/Gaffer

/**
 * A {@code ReservoirLongsUnionAggregator} is a {@link java.util.function.BinaryOperator} that aggregates
 * {@link ReservoirLongsUnion}s. It does this by extracting a {@link com.yahoo.sketches.sampling.ReservoirLongsSketch}
 * from each {@link ReservoirLongsUnion} and merges that using
 * {@link ReservoirLongsUnion#update(com.yahoo.sketches.sampling.ReservoirLongsSketch)}.
 */
@Since("1.0.0")
@Summary("Aggregates ReservoirLongsUnions")
public class ReservoirLongsUnionAggregator extends KorypheBinaryOperator<ReservoirLongsUnion> {

  @Override
  protected ReservoirLongsUnion _apply(final ReservoirLongsUnion a, final ReservoirLongsUnion b) {
    a.update(b.getResult());
    return a;
  }
}

origin: gchq/Gaffer

/**
 * A {@code HllSketchAggregator} is a {@link java.util.function.BinaryOperator} that takes in
 * {@link HllSketch}s and merges them together using a {@link Union}.
 */
@Since("1.0.0")
@Summary("Aggregates HllSketches together using a Union")
public class HllSketchAggregator extends KorypheBinaryOperator<HllSketch> {

  @Override
  protected HllSketch _apply(final HllSketch a, final HllSketch b) {
    final Union union = new Union(a.getLgConfigK());
    union.update(a);
    union.update(b);
    return union.getResult();
  }
}

origin: gchq/Gaffer

/**
 * A {@code DoublesSketchAggregator} is a {@link java.util.function.BinaryOperator} that aggregates
 * {@link DoublesSketch}s using a {@link DoublesUnion}.
 */
@Since("1.0.0")
@Summary("Aggregates DoublesSketches using a DoublesUnion")
public class DoublesSketchAggregator extends KorypheBinaryOperator<DoublesSketch> {

  @Override
  protected DoublesSketch _apply(final DoublesSketch a, final DoublesSketch b) {
    final DoublesUnion union = DoublesUnion.builder().setMaxK(a.getK()).build();
    union.update(a);
    union.update(b);
    return union.getResult();
  }
}

origin: gchq/Gaffer

/**
 * An {@code ExtractWalkVertex} is a utility {@link KorypheFunction},
 * for simplifying the extraction of the starting Vertex from a {@link Walk} object.
 */
@Since("1.3.0")
@Summary("Extracts the source vertex from a Walk")
public class ExtractWalkVertex extends KorypheFunction<Walk, Object> {
  @Override
  public Object apply(final Walk walk) {
    if (null == walk) {
      throw new IllegalArgumentException("Walk cannot be null");
    }
    return walk.getSourceVertex();
  }
}

origin: gchq/Gaffer

/**
 * A {@code StringsSketchAggregator} is a {@link java.util.function.BinaryOperator} that aggregates
 * {@link ItemsSketch}s of {@link String}s using an {@link ItemsUnion}.
 */
@Since("1.0.0")
@Summary("Aggregates ItemsSketches of Strings using an ItemsUnion")
public class StringsSketchAggregator extends KorypheBinaryOperator<ItemsSketch<String>> {

  @Override
  protected ItemsSketch<String> _apply(final ItemsSketch<String> a, final ItemsSketch<String> b) {
    final ItemsUnion<String> union = ItemsUnion.getInstance(Ordering.<String>natural());
    union.update(a);
    union.update(b);
    return union.getResult();
  }
}

origin: gchq/Gaffer

/**
 * An {@code ExtractWalkEdges} is a utility {@link KorypheFunction} for extracting the {@link java.util.List} of
 * {@link Set}s of Gaffer {@link Edge}s, from a provided {@link Walk} object.
 */
@Since("1.2.0")
@Summary("Extracts the sets of edges from a Walk")
public class ExtractWalkEdges extends KorypheFunction<Walk, Iterable<Set<Edge>>> {
  @Override
  public Iterable<Set<Edge>> apply(final Walk walk) {
    if (null == walk) {
      throw new IllegalArgumentException("Walk cannot be null");
    }
    return walk.getEdges();
  }
}

uk.gov.gchq.korypheSince

Most used methods

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for WebStorm
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