From 7df509e1641e47c907f8e83944088fb15b9a2f46 Mon Sep 17 00:00:00 2001 From: Emmanuel CHEBBI Date: Fri, 2 Feb 2018 01:24:53 +0100 Subject: [PATCH] Fix a typo The arguments of the `Column.id` method are not in the right order. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index df110a4..9f3726e 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ As of now, the API makes able to: Because code is better than words, here is a quick overview of the API: ```java -ColumnId AGE = id(Integer.class, "age"); -ColumnId NAME = id(String.class, "name"); +ColumnId AGE = id("age", Integer.class); +ColumnId NAME = id("name", String.class); Table people = new DataTable(); people.columns() @@ -44,7 +44,7 @@ Basically, they are simple data structure containing: An id is represented by the [ColumnId](https://github.com/KazeJiyu/datatable/blob/master/src/main/java/fr/kazejiyu/generic/datatable/core/impl/ColumnId.java) class and can be created with the `id` static method : ```java // name is an id that matches any column containing Strings and which header is "col1" -ColumnId name = ColumnId.id(String.class, "col1"); +ColumnId name = ColumnId.id("col1", String.class); ``` > In the following document, ids are used everywhere. @@ -127,8 +127,8 @@ import static fr.kazejiyu.generic.datatable.core.impl.ColumnId.*; public class Main { // Reference table's columns - private static final ColumnId AGE = id(Integer.class, "age"); - private static final ColumnId NAME = id(String.class, "name"); + private static final ColumnId AGE = id("age", Integer.class); + private static final ColumnId NAME = id("name", String.class); Table adultsWhoseNameEndsWithLetterE(Table people) { return people.filter(row -> @@ -149,9 +149,9 @@ import static fr.kazejiyu.generic.datatable.core.impl.ColumnId.*; public class Main { // Reference table's columns - private static final ColumnId AGE = id(Integer.class, "age"); - private static final ColumnId NAME = id(String.class, "name"); - private static final ColumnId SURENAME = id(String.class, "surename"); + private static final ColumnId AGE = id("age", Integer.class); + private static final ColumnId NAME = id("name", String.class); + private static final ColumnId SURENAME = id("surename", String.class); // Retrieve all european adults whose both name and surename ends with the letter "e" Table adultsWhoseNameEndsWithLetterE(Table people) {