6 | | * make sure the code is Java 8 compatible |
7 | | * '''Document''' your code using inline comments and javadoc. Many people will thank you :) |
8 | | * Try to avoid public fields |
9 | | * JOSM has a lot of helper methods in the `Utils`, `GuiUtils`, `Geometry` ... classes. Use them if you need |
10 | | * Check parameters. You can use `Objects.requireNonNull`. |
11 | | * Don't write for performance - write for readability. Use `Stream`s, `Function`s and other Java 8 features if they make the code more readable. |
| 6 | * コードがJava 8と互換性があることを確認してください |
| 7 | * インラインコメントとjavadocを使用してコードを'''ドキュメント化'''します。多くの人があなたに感謝します :) |
| 8 | * パブリックフィールドを避けるようにしてください |
| 9 | * JOSMは `Utils`、` GuiUtils`、 `Geometry` ...クラスに多くのヘルパーメソッドを持っています。必要に応じて使用してください |
| 10 | * パラメータを確認してください。`Objects.requireNonNull`を使うことができます。 |
| 11 | * パフォーマンスのために記述しないでください - 読みやすいように記述してください。`Stream`、` Function`や他のJava 8の機能を使うと、コードを読みやすくします。 |
15 | | * JOSM uses various locking mechanisms, depending on the object. |
16 | | * The data sets are protected by a RW lock. Some methods do not automatically lock for performance reasons. Make sure to acquire the locks required for your changes. |
17 | | * GUI components should only be modified in the EDT thread |
18 | | * Prefer to use `SwingUtils.invokeLater` if you need to run anything on the UI thread |
| 15 | * JOSMは、オブジェクトに応じてさまざまなロック機構を使用します。 |
| 16 | * データセットはRWロックによって保護されています。パフォーマンス上の理由から自動的にロックされないメソッドもあります。変更に必要なロックを取得してください。 |
| 17 | * GUIコンポーネントはEDTスレッドでのみ変更する必要があります |
| 18 | * UIスレッドで何かを実行する必要がある場合は `SwingUtils.invokeLater`を使用することをお勧めします |