Skip to content

Commit

Permalink
[util] Deprecate the event scoping implementations.
Browse files Browse the repository at this point in the history
see #791

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Dec 8, 2017
1 parent c5263c6 commit 586e911
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Expand Up @@ -33,8 +33,10 @@ import io.sarl.lang.core.Scope
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @Deprecated since 0.7, replaced by closure expressions.
*/
class AddressScope implements Scope<Address> {
@Deprecated
class AddressScope implements Scope<Address> {

static val SCOPE_ID = "aid://"

Expand Down Expand Up @@ -67,7 +69,6 @@ import io.sarl.lang.core.Scope

override matches(address : Address) : boolean {
assert address !== null
// TODO Do dichotomic search.
for (element : this.addresses) {
if (element == address) {
return true
Expand Down
Expand Up @@ -35,8 +35,10 @@ import io.sarl.lang.core.Scope
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @since 0.6
* @deprecated since 0.7, replaced by closure expressions.
*/
class IdentifierScope implements Scope<Address> {
@Deprecated
class IdentifierScope implements Scope<Address> {

static val SCOPE_ID = "id://"

Expand Down Expand Up @@ -69,7 +71,6 @@ import io.sarl.lang.core.Scope

override matches(address : Address) : boolean {
assert address !== null
// TODO Do dichotomic search.
for (element : this.identifiers) {
if (element == address.UUID) {
return true
Expand Down
2 changes: 2 additions & 0 deletions main/apiplugins/io.sarl.util/src/io/sarl/util/Scopes.sarl
Expand Up @@ -33,7 +33,9 @@ import io.sarl.lang.core.Scope
* @version $FullVersion$
* @mavengroupid $GroupId$
* @mavenartifactid $ArtifactId$
* @deprecated since 0.7, replaced by closure expressions.
*/
@Deprecated
final class Scopes {

static val ALL : Scope<?> = new AlwaysTrueScope
Expand Down

0 comments on commit 586e911

Please sign in to comment.