diff options
author | samukce <samuel.p.araujo@gmail.com> | 2020-06-04 22:59:13 -0700 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-06-11 21:47:27 +0200 |
commit | 0fd663bb9974cb1994ea5b0339ad0343b665864d (patch) | |
tree | 9d0d226a06c5b4715b5e86273ef426eff1138740 /src/core/lombok/EqualsAndHashCode.java | |
parent | a2941041d4d4b3db2a12a38212226f36c11219ab (diff) | |
download | lombok-0fd663bb9974cb1994ea5b0339ad0343b665864d.tar.gz lombok-0fd663bb9974cb1994ea5b0339ad0343b665864d.tar.bz2 lombok-0fd663bb9974cb1994ea5b0339ad0343b665864d.zip |
Oder equals/hashcode fields by rank or position
Diffstat (limited to 'src/core/lombok/EqualsAndHashCode.java')
-rw-r--r-- | src/core/lombok/EqualsAndHashCode.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lombok/EqualsAndHashCode.java b/src/core/lombok/EqualsAndHashCode.java index e752165c..02596f24 100644 --- a/src/core/lombok/EqualsAndHashCode.java +++ b/src/core/lombok/EqualsAndHashCode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2018 The Project Lombok Authors. + * Copyright (C) 2009-2020 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -122,5 +122,12 @@ public @interface EqualsAndHashCode { * @return If present, this method serves as replacement for the named field. */ String replaces() default ""; + + /** + * Higher ranks are considered first. Members of the same rank are considered in the order they appear in the source file. + * + * @return ordering within the generating {@code equals} and {@code hashCode} methods; higher numbers are considered first. + */ + int rank() default 0; } } |