atlantis

Basic graph data structures and algorithms.

License

License

Categories

Categories

Ant Build Tools
GroupId

GroupId

com.github.tommyettinger
ArtifactId

ArtifactId

atlantis
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

atlantis
Basic graph data structures and algorithms.
Project URL

Project URL

https://github.com/tommyettinger/atlantis
Source Code Management

Source Code Management

https://github.com/tommyettinger/atlantis

Download atlantis

How to add to project

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

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

atlantis

Ordered JDK Map and Set classes that allow lookup at an index

Installation

With Gradle (may need api instead of implementation, or compile for old Gradle):

implementation 'com.github.tommyettinger:atlantis:0.0.1'

Or with Maven:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>atlantis</artifactId>
  <version>0.0.1</version>
</dependency>

Or you can use JitPack using its instructions.

Usage

You have IndexedMap and IndexedSet now! These are quite full-featured collections that are similar to the existing JDK classes LinkedHashMap and LinkedHashSet; all of these are insertion-ordered but otherwise act like HashMap. Except, IndexedMap and IndexedSet allow lookup by index in constant time, which removes the need to make iterators, and allow offline sorting of their entries by key or by value. There's some other features too, like alter() to change a key without changing its position in the order (or its value). Mostly, these are like a regular Map, with keyAt(), getAt(), removeAt(), and so on added to operate at a given index (hence the library name).

Many of these features are already in libGDX's OrderedMap and OrderedSet classes, but neither of those implements any JDK interface, so they aren't very interoperable.

Licence

Apache 2.0, see LICENSE.

Versions

Version
0.0.1