org.LexGrid.LexBIG.Impl.helpers
Class DefaultCodeHolder

java.lang.Object
  extended by org.LexGrid.LexBIG.Impl.helpers.DefaultCodeHolder
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, AdditiveCodeHolder, CodeHolder

public class DefaultCodeHolder
extends java.lang.Object
implements AdditiveCodeHolder, java.io.Serializable

Class to hold unique concepts per code system that should be returned as a result of a query.

Version:
subversion $Revision: $ checked in on $Date: $
Author:
Dan Armbrust, Jesse Erdmann, Kevin Peterson
See Also:
Serialized Form

Constructor Summary
DefaultCodeHolder()
           
DefaultCodeHolder(java.util.List<CodeToReturn> codes)
           
 
Method Summary
 void add(CodeToReturn code)
          Adds the code.
 CodeHolder clone()
           
 boolean contains(CodeToReturn code)
          Contains.
 void difference(CodeHolder otherCodes)
          Difference.
 java.util.List<CodeToReturn> getAllCodes()
          Gets the all codes.
 int getNumberOfCodes()
          Gets the number of codes.
 void intersect(CodeHolder otherCodes)
          Intersect.
 void remove(CodeToReturn code)
          Removes the.
 void union(CodeHolder otherCodes)
          Union.
 boolean wereScoresCollected()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCodeHolder

public DefaultCodeHolder(java.util.List<CodeToReturn> codes)

DefaultCodeHolder

public DefaultCodeHolder()
Method Detail

wereScoresCollected

public boolean wereScoresCollected()

add

public void add(CodeToReturn code)
Description copied from interface: AdditiveCodeHolder
Adds the code.

Specified by:
add in interface AdditiveCodeHolder
Parameters:
code - the code

remove

public void remove(CodeToReturn code)
Description copied from interface: CodeHolder
Removes the.

Specified by:
remove in interface CodeHolder
Parameters:
code - the code

getAllCodes

public java.util.List<CodeToReturn> getAllCodes()
Description copied from interface: CodeHolder
Gets the all codes.

Specified by:
getAllCodes in interface CodeHolder
Returns:
the all codes

contains

public boolean contains(CodeToReturn code)
Description copied from interface: CodeHolder
Contains.

Specified by:
contains in interface CodeHolder
Parameters:
code - the code
Returns:
true, if successful

union

public void union(CodeHolder otherCodes)
Description copied from interface: CodeHolder
Union.

Specified by:
union in interface CodeHolder
Parameters:
otherCodes - the other codes

intersect

public void intersect(CodeHolder otherCodes)
Description copied from interface: CodeHolder
Intersect.

Specified by:
intersect in interface CodeHolder
Parameters:
otherCodes - the other codes

difference

public void difference(CodeHolder otherCodes)
Description copied from interface: CodeHolder
Difference.

Specified by:
difference in interface CodeHolder
Parameters:
otherCodes - the other codes

getNumberOfCodes

public int getNumberOfCodes()
Description copied from interface: CodeHolder
Gets the number of codes.

Specified by:
getNumberOfCodes in interface CodeHolder
Returns:
the number of codes

clone

public CodeHolder clone()
                 throws java.lang.CloneNotSupportedException
Specified by:
clone in interface CodeHolder
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.