Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

What is the Top Methods Kata?

The Tops Methods Kata is a simple Code Kata with a set of tests that a developer can complete to quickly familiarize themselves with the top 25 methods available in Eclipse Collections. The kata was first shared as a blog here.

The top 25 methods that can be learned in this kata are:

  • with - Collection factory method
  • collect - Transform a collection from one type to another
  • of - Alt collection factory method - Preposition Preference
  • select - Filter a collection inclusively
  • reject - Filter a collection exclusively
  • count - Count elements based on a predicate
  • anySatisfy - Return true if any elements match a predicate
  • allSatisfy - Return true if all elements match a predicate
  • noneSatisfy - Return true if no elements match a predicate
  • groupBy - Group elements based on a Function
  • countBy - Count elements by a Function
  • makeString - Convert a collection to a String using separators
  • toImmutable - Convert a collection to an immutable equivalent
  • asLazy - Create a lazy view on the collection
  • containsBy - Check containment of a value based on a Function
  • detectWith - Find the first element that matches a Predicate
  • detectWithIfNone - Same as detectWith, but handles case of none
  • injectInto - Continuum Transfunctioner - Its mystery is only exceeded by its power
  • partition - Splits a collection based on Predicate
  • chunk - Breaks a collection into chunks based on a size
  • sumByInt - Sums a collection by a key Function and int value
  • collectInt - Eight primitive versions of collect
  • flatCollectChar - Eight primitive versions of flatCollect
  • asParallel - Returns a performant Lazy ParallelIterable
  • distinct - Returns the distinct values in a List

The domain of the Top Methods Kata includes the Fruit class.

Getting Started

Complete the exercises in the tests folder.

The Person class is in the main folder.