-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb56306
commit 28f75d7
Showing
5 changed files
with
67 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/fr/firstmegagame4/env/json/api/rule/NotEnvJsonRule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package fr.firstmegagame4.env.json.api.rule; | ||
|
||
public interface NotEnvJsonRule extends EnvJsonRule { | ||
|
||
EnvJsonRule rule(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/fr/firstmegagame4/env/json/impl/rule/NotEnvJsonRuleImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package fr.firstmegagame4.env.json.impl.rule; | ||
|
||
import fr.firstmegagame4.env.json.api.EnvJsonVisitor; | ||
import fr.firstmegagame4.env.json.api.rule.EnvJsonRule; | ||
import fr.firstmegagame4.env.json.api.rule.NotEnvJsonRule; | ||
import org.jetbrains.annotations.ApiStatus; | ||
|
||
@ApiStatus.Internal | ||
public class NotEnvJsonRuleImpl extends EnvJsonRuleImpl implements NotEnvJsonRule { | ||
|
||
private final EnvJsonRule rule; | ||
|
||
public NotEnvJsonRuleImpl(EnvJsonRule rule) { | ||
super(Type.NOT); | ||
this.rule = rule; | ||
} | ||
|
||
@Override | ||
public EnvJsonRule rule() { | ||
return this.rule; | ||
} | ||
|
||
@Override | ||
public boolean apply(EnvJsonVisitor visitor) { | ||
return !this.rule.apply(visitor); | ||
} | ||
} |