net.markenwerk:commons-iterables

Some common iterators for Android

License

License

Categories

Categories

Net
GroupId

GroupId

net.markenwerk
ArtifactId

ArtifactId

android-commons-iterables
Last Version

Last Version

2.2.1
Release Date

Release Date

Type

Type

aar
Description

Description

net.markenwerk:commons-iterables
Some common iterators for Android
Project URL

Project URL

https://github.com/markenwerk/android-commons-iterables
Project Organization

Project Organization

Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH
Source Code Management

Source Code Management

https://github.com/markenwerk/android-commons-iterables

Download android-commons-iterables

How to add to project

<!-- https://jarcasting.com/artifacts/net.markenwerk/android-commons-iterables/ -->
<dependency>
    <groupId>net.markenwerk</groupId>
    <artifactId>android-commons-iterables</artifactId>
    <version>2.2.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/net.markenwerk/android-commons-iterables/
implementation 'net.markenwerk:android-commons-iterables:2.2.1'
// https://jarcasting.com/artifacts/net.markenwerk/android-commons-iterables/
implementation ("net.markenwerk:android-commons-iterables:2.2.1")
'net.markenwerk:android-commons-iterables:aar:2.2.1'
<dependency org="net.markenwerk" name="android-commons-iterables" rev="2.2.1">
  <artifact name="android-commons-iterables" type="aar" />
</dependency>
@Grapes(
@Grab(group='net.markenwerk', module='android-commons-iterables', version='2.2.1')
)
libraryDependencies += "net.markenwerk" % "android-commons-iterables" % "2.2.1"
[net.markenwerk/android-commons-iterables "2.2.1"]

Dependencies

compile (2)

Group / Artifact Type Version
net.markenwerk : android-commons-iterators jar 2.2.1
net.markenwerk : commons-iterables jar 2.2.1

Project Modules

There are no modules declared in this project.

Some common iterators for Android

Build Status Maven Central API Level 8 MIT License

Overview

This is a collection of companion Iterables for some commonly useful Iterator implementations for the following use cases:

This library is an extensions of the corresponding library for Java, that contains Iterables for Android specific data structures.

This library is hosted in the Maven Central Repository. You can use it with the following coordinates:

compile 'net.markenwerk:android-commons-iterables:3.1.0'

Consult the usage description and Javadoc for further information.

Usage

Iterating over sparse arrays

This library provides the following Iterables that take existing sparse arrays and generate Iterables and yield all elements of the given array wrapped in an Entry:

SparseArray<Foo> sparseArray = ...

// generated iterables yield every foo from sparseArray
Iterable<Entry<Integer, Foo>> arraytIterable = new SparseArrayIterable<>(sparseArray);

Iterating over other objects

This library provides the generic PairIterable that takes and existing Pair and generates Iterators that yield both contained values.

Pair<Foo, Foo> pair = ...

// yields both foos from pair
Iterable<Foo> pairIterator = new PairIterable<>(pair);
net.markenwerk

Markenwerk

Versions

Version
2.2.1
2.2.0