net.markenwerk:commons-iterators

Some common iterators for Android

License

License

Categories

Categories

Net
GroupId

GroupId

net.markenwerk
ArtifactId

ArtifactId

android-commons-iterators
Last Version

Last Version

2.2.1
Release Date

Release Date

Type

Type

aar
Description

Description

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

Project URL

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

Project Organization

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

Source Code Management

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

Download android-commons-iterators

How to add to project

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

Dependencies

compile (1)

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

Project Modules

There are no modules declared in this project.

Some common iterators for Java

Build Status Maven Central API Level 8 MIT License

Overview

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

This library is an extensions of the corresponding library for Java, that contains Iterators 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-iterators:3.1.0'

Consult the usage description and Javadoc for further information.

Usage

Iterating over sparse arrays

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

SparseArray<Foo> sparseArray = ...

// yields every foo from sparseArray
Iterator<Entry<Integer, Foo>> arraytIterator = new SparseArrayIterator<>(sparseArray);

Iterating over other objects

This library provides the generic PairIterator that takes and existing Pair and yields both contained values.

Pair<Foo, Foo> pair = ...

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

Markenwerk

Versions

Version
2.2.1
2.2.0