de.topicmapslab.majortom.core
Class ScopeImpl

java.lang.Object
  extended by de.topicmapslab.majortom.core.ScopeImpl
All Implemented Interfaces:
de.topicmapslab.majortom.model.core.IScope

public class ScopeImpl
extends java.lang.Object
implements de.topicmapslab.majortom.model.core.IScope

Base implementation of IScope

Author:
Sven Krosse

Field Summary
private  java.lang.String id
          the internal id
private  java.util.Set<de.topicmapslab.majortom.model.core.ITopic> themes
          internal theme set
 
Constructor Summary
ScopeImpl()
          constructor
ScopeImpl(java.util.Set<de.topicmapslab.majortom.model.core.ITopic> themes)
          constructor
ScopeImpl(java.lang.String id)
          constructor
ScopeImpl(java.lang.String id, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          constructor
 
Method Summary
 boolean containsTheme(de.topicmapslab.majortom.model.core.ITopic theme)
          
 boolean equals(java.lang.Object arg0)
          
 java.lang.String getId()
          
<T extends de.topicmapslab.majortom.model.core.ITopic>
java.util.Set<T>
getThemes()
          
 int hashCode()
          
 void replaceTheme(de.topicmapslab.majortom.model.core.ITopic theme, de.topicmapslab.majortom.model.core.ITopic replacement)
          replace the given theme by the given replacement
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

themes

private final java.util.Set<de.topicmapslab.majortom.model.core.ITopic> themes
internal theme set


id

private final java.lang.String id
the internal id

Constructor Detail

ScopeImpl

public ScopeImpl(java.lang.String id)
constructor

Parameters:
id - the internal id

ScopeImpl

public ScopeImpl()
constructor


ScopeImpl

public ScopeImpl(java.lang.String id,
                 java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
constructor

Parameters:
id - the internal id
themes - the themes

ScopeImpl

public ScopeImpl(java.util.Set<de.topicmapslab.majortom.model.core.ITopic> themes)
constructor

Parameters:
themes - the themes
Method Detail

containsTheme

public boolean containsTheme(de.topicmapslab.majortom.model.core.ITopic theme)

Specified by:
containsTheme in interface de.topicmapslab.majortom.model.core.IScope

getThemes

public <T extends de.topicmapslab.majortom.model.core.ITopic> java.util.Set<T> getThemes()

Specified by:
getThemes in interface de.topicmapslab.majortom.model.core.IScope

replaceTheme

public void replaceTheme(de.topicmapslab.majortom.model.core.ITopic theme,
                         de.topicmapslab.majortom.model.core.ITopic replacement)
replace the given theme by the given replacement

Parameters:
theme - the theme
replacement - the replacement

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object arg0)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

getId

public java.lang.String getId()

Specified by:
getId in interface de.topicmapslab.majortom.model.core.IScope