Giter Club home page Giter Club logo

ordereddictionary's Introduction

OrderedDictionary

OrderedDictionary is a lightweight implementation of an ordered dictionary data structure in Swift.

The OrderedDictionary struct is a generic collection which combines the features of Dictionary and Array from the Swift standard library. Like Dictionary it stores key-value pairs with each key being unique and maps each key to an associated value. Like Array it stores those pairs sorted and accessible by a zero-based integer index.

OrderedDictionary provides similar APIs like collections in the Swift standard library. This includes accessing contents by keys or indices, inserting and removing elements, iterating, sorting etc.

Internally OrderedDictionary uses a backing store composed of an instance of Dictionary for storing the key-value pairs and an instance of Array for managing the ordered keys. This means it is not the most performant implementation possible, but it gets its job done by reusing most functionality from the Swift standard library.

Requirements

  • Swift 4
  • Xcode 9
  • iOS 8.0+ / OS X 10.10+

Installation

This library is distributed as a Swift framework and can be integrated into your project in following ways:

Carthage

The easiest way is to use the package manager Carthage.

  1. Add github "lukaskubanek/OrderedDictionary" to your Cartfile.
  2. Run carthage bootstrap.
  3. Drag either the OrderedDictionary.xcodeproj or the OrderedDictionary.framework into your project/workspace and link your target against the OrderedDictionary.framework.
  4. Make sure the framework gets copied to your application bundle.
  5. Import the framework using import OrderedDictionary.

Submodule & Xcode Project

Another option is to use Git submodules and integrating the Xcode project OrderedDictionary.xcodeproj directly to your Xcode workspace.

Usage & Docs

For the usage of this library please refer to the example playground. For documentation please refer to the documentation comments.

Changelog

The changelog is managed on the GitHub releases page.

Author

Lukas Kubanek // lukaskubanek.com // @kubanekl

License

OrderedDictionary is provided under the MIT License.

ordereddictionary's People

Contributors

lukaskubanek avatar mbrgm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.