From 1520c972c5ae0a5366e645c43a3d29106f788914 Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Thu, 11 Jul 2019 22:47:24 +0200 Subject: [PATCH] Fix CONVENTIONS.md typos (#770) --- CONVENTIONS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 532e3db692..d9d747b797 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -89,8 +89,8 @@ Use "serializer" for objects whose purpose is serializing or deserializing some Use "from" for static methods that create an object of the method owner's type (`fromJson`, `fromNbt`, `fromString`). Use "to" for methods that convert an object to another type (`toString`, `toLong`, `toNbt`). -Use "read" for non-static methods that load data into a class. Use "write" for methods that save data to an *existing* object -passed as a parameter. +Use "read" for non-static methods that load data into the object. Use "write" for methods that save data to an *existing* +object passed as a parameter. ### Factories and builders @@ -102,7 +102,7 @@ as the field they're setting, without any prefix. ### Collections Use a plural name for collections and maps rather than the words "list", "set", "array", etc., unless it's a collection of -collection or there are several collections of different types containing the same objects (`entities`, `entityLists`). +collections or there are several collections of different types containing the same objects (`entities`, `entityLists`). When it's enough, name maps based on the value type. Otherwise, name it in the "`valuesByKeys`" format. @@ -131,7 +131,7 @@ There are however three exceptions to this rule: ## Things to avoid -Don't name methods based on implementation details. Names should describe what methods do, now how they work. +Don't name methods based on implementation details. Names should describe what methods do, not how they work. Avoid including Java-related information in names. For example, don't prefix class names with `I`, or `Enum` and don't prefix methods with `private`. Instead, try to find meaningful names to describe differences between classes. In the