gfc-collection


Лицензия

Лицензия

Apache-style
Группа

Группа

com.gilt
Идентификатор

Идентификатор

gfc-collection_2.9.1
Последняя версия

Последняя версия

0.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

gfc-collection
gfc-collection
Организация-разработчик

Организация-разработчик

com.gilt

Скачать gfc-collection_2.9.1

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.gilt/gfc-collection_2.9.1/ -->
<dependency>
    <groupId>com.gilt</groupId>
    <artifactId>gfc-collection_2.9.1</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.gilt/gfc-collection_2.9.1/
implementation 'com.gilt:gfc-collection_2.9.1:0.0.1'
// https://jarcasting.com/artifacts/com.gilt/gfc-collection_2.9.1/
implementation ("com.gilt:gfc-collection_2.9.1:0.0.1")
'com.gilt:gfc-collection_2.9.1:jar:0.0.1'
<dependency org="com.gilt" name="gfc-collection_2.9.1" rev="0.0.1">
  <artifact name="gfc-collection_2.9.1" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gilt', module='gfc-collection_2.9.1', version='0.0.1')
)
libraryDependencies += "com.gilt" % "gfc-collection_2.9.1" % "0.0.1"
[com.gilt/gfc-collection_2.9.1 "0.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.scala-lang : scala-library jar 2.9.1

test (3)

Идентификатор библиотеки Тип Версия
org.testng : testng jar 6.0
org.scalatest : scalatest_2.9.1 jar 1.9.2
org.scalacheck : scalacheck_2.9.1 jar 1.10.1

Модули Проекта

Данный проект не имеет модулей.

gfc-collection Maven Central Build Status Coverage Status Join the chat at https://gitter.im/gilt/gfc

A library that contains scala collection utility classes. Part of the Gilt Foundation Classes.

Getting gfc-collection

The latest version is 0.0.5, which is cross-built against Scala 2.10.x, 2.11.x and 2.12.x.

If you're using SBT, add the following line to your build file:

libraryDependencies += "com.gilt" %% "gfc-collection" % "0.0.5"

For Maven and other build tools, you can visit search.maven.org. (This search will also list other available libraries from the gilt fundation classes.)

Contents and Example Usage

com.gilt.gfc.collection.CircularBuffer

Simple non-thread-safe circular buffer implementation that supports adding a new item, finding the oldest item, the newest item, or iterating from oldest to newest.

val buffer = new CircularBuffer[Int](5)

buffer.add(0)
assert(buffer.oldest == 0)
assert(buffer.newest == 0)
assert(buffer.size == 1)

(1 to 4).foreach(buffer.add(_))
assert(buffer.oldest == 0)
assert(buffer.newest == 4)
assert(buffer.size == 5)

buffer.add(5)
assert(buffer.oldest == 1)
assert(buffer.newest == 5)
assert(buffer.size == 5)

com.gilt.gfc.collection.TopN

Utility to select top N items from a collection.

val numbers = scala.util.Random.shuffle(0 to 1000)
assert(TopN(5, numbers) == Seq(0, 1, 2, 3, 4))
assert(TopN(5, numbers)(scala.math.Ordering.Int.reverse) == Seq(1000, 999, 998, 997, 996))

License

Copyright 2018 Gilt Groupe, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

com.gilt

Gilt Tech

Версии библиотеки

Версия
0.0.1