public final class Scope
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_KEY
The property name, for when the scope is passed as a property string.
|
static Scope |
ROOT
The default scope.
|
Modifier and Type | Method and Description |
---|---|
Scope |
child(java.lang.String id)
Creates a child scope with the given id.
|
boolean |
equals(java.lang.Object o) |
static Scope |
from(java.util.Map<java.lang.String,java.lang.Object> properties)
Returns the scope id if found in the supplied properties.
|
int |
hashCode() |
boolean |
includes(Scope scope)
Determines if this scope is the supplied scope,
or the parent of the supplied scope.
|
static Scope |
of(java.lang.String id)
Returns a new scope with the given id.
|
java.lang.String |
toString() |
public static final Scope ROOT
public static final java.lang.String PROPERTY_KEY
public static Scope from(java.util.Map<java.lang.String,java.lang.Object> properties)
properties
- the properties where to look for the scopepublic Scope child(java.lang.String id)
id
- the child idpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean includes(Scope scope)
scope
- the scope to checkpublic static Scope of(java.lang.String id)
id
- the scope id