org.jboss.metadata.spi.scope
Class ScopeKey

java.lang.Object
  extended by org.jboss.metadata.spi.scope.ScopeKey
All Implemented Interfaces:
Serializable, Cloneable

public class ScopeKey
extends Object
implements Serializable, Cloneable

ScopeKey.

Version:
$Revision: 75678 $
Author:
Adrian Brock
See Also:
Serialized Form

Field Summary
static ScopeKey DEFAULT_SCOPE
          The default scope
 
Constructor Summary
ScopeKey()
          Create a new ScopeKey.
ScopeKey(Collection<Scope> scopes)
          Create a new ScopeKey.
ScopeKey(Scope scope)
          Create a new ScopeKey.
ScopeKey(Scope[] scopes)
          Create a new ScopeKey.
ScopeKey(ScopeLevel level, Object qualifier)
          Create a new ScopeKey.
 
Method Summary
 Scope addScope(Scope scope)
          Add a scope
 Scope addScope(ScopeLevel level, Object qualifier)
          Add a scope
 ScopeKey clone()
           
 boolean equals(Object object)
           
 void freeze()
          Set to frozen.
 ScopeLevel getMaxScopeLevel()
          Get the maximum scope level
 ScopeKey getParent()
          Get the parent scope key
 Scope getScope(ScopeLevel level)
          Get a scope
 Scope getScopeLevel(ScopeLevel scopeLevel)
          Get a scope level
 Collection<Scope> getScopes()
          Get the scopes
 int hashCode()
           
 boolean isFrozen()
          Get the frozen.
 boolean isParent(ScopeKey key)
          Is this parent of key parameter.
 Scope removeScope(Scope scope)
          Remove a scope
 Scope removeScopeLevel(ScopeLevel scopeLevel)
          Remove a scope level
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SCOPE

public static ScopeKey DEFAULT_SCOPE
The default scope

Constructor Detail

ScopeKey

public ScopeKey()
Create a new ScopeKey.


ScopeKey

public ScopeKey(Scope scope)
Create a new ScopeKey.

Parameters:
scope - the scope

ScopeKey

public ScopeKey(ScopeLevel level,
                Object qualifier)
Create a new ScopeKey.

Parameters:
level - the scope level
qualifier - the scope qualifier

ScopeKey

public ScopeKey(Collection<Scope> scopes)
Create a new ScopeKey.

Parameters:
scopes - the scopes

ScopeKey

public ScopeKey(Scope[] scopes)
Create a new ScopeKey.

Parameters:
scopes - the scopes
Method Detail

isFrozen

public boolean isFrozen()
Get the frozen.

Returns:
the frozen.

freeze

public void freeze()
Set to frozen.


getScopes

public Collection<Scope> getScopes()
Get the scopes

Returns:
the scopes

getScope

public Scope getScope(ScopeLevel level)
Get a scope

Parameters:
level - the scope level
Returns:
the scope

getMaxScopeLevel

public ScopeLevel getMaxScopeLevel()
Get the maximum scope level

Returns:
the largest scope level

getParent

public ScopeKey getParent()
Get the parent scope key

Returns:
the parent or null if there is no parent

isParent

public boolean isParent(ScopeKey key)
Is this parent of key parameter.

Parameters:
key - the key parameter
Returns:
true if this is direct parent of key param

addScope

public Scope addScope(Scope scope)
Add a scope

Parameters:
scope - the scope
Returns:
the previous value or null if there wasn't one

addScope

public Scope addScope(ScopeLevel level,
                      Object qualifier)
Add a scope

Parameters:
level - the scope level
qualifier - the scope qualifier
Returns:
the previous value or null if there wasn't one

removeScope

public Scope removeScope(Scope scope)
Remove a scope

Parameters:
scope - the scope
Returns:
the previous value or null if there wasn't one

getScopeLevel

public Scope getScopeLevel(ScopeLevel scopeLevel)
Get a scope level

Parameters:
scopeLevel - the scope level
Returns:
the scope or null if there is no such level

removeScopeLevel

public Scope removeScopeLevel(ScopeLevel scopeLevel)
Remove a scope level

Parameters:
scopeLevel - the scope level
Returns:
the scope or null if there is no such level

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public ScopeKey clone()
Overrides:
clone in class Object


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.