Replace registerIfAbsent by registerIfNew and make registerIfAbsent follow its name better

This commit is contained in:
alexcrea 2024-10-31 10:39:28 +01:00
parent ece369ae55
commit 4c7ee760a6
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F

View file

@ -359,10 +359,19 @@ public class ConflictBuilder {
/** /**
* Register this conflict if not yet registered. * Register this conflict if not yet registered.
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder)} * Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder, boolean) ConflictAPI.addConflict(this, true)}}
* @return True if successful. * @return True if successful.
*/ */
public boolean registerIfAbsent(){ public boolean registerIfAbsent(){
return ConflictAPI.addConflict(this, true);
}
/**
* Register this conflict if not yet registered or deleted.
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder) ConflictAPI.addConflict(this)}
* @return True if successful.
*/
public boolean registerIfNew(){
return ConflictAPI.addConflict(this); return ConflictAPI.addConflict(this);
} }