gov.nasa.arc.brahms.common.data
Class CollectionType

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.data.CollectionType
All Implemented Interfaces:
Type, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable

public class CollectionType
extends BrahmsObject
implements Type

A CollectionType represents a type that can maintain a list of multiple values optionally identified by an index or key. This type is one of the types used to define the type of attributes, variables or parameters.

Version:
$Revision: 1.3 $ $Date: 2009/04/03 19:17:59 $ $Author: rvhoof $
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
static CollectionType MAP_TYPE
           
 
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML
 
Constructor Summary
CollectionType()
          Constructor, creates a new undefined CollectionType
CollectionType(int type)
          Constructor, creates a new CollectionType for the specified type of collection.
 
Method Summary
 boolean compareTypes(Type type, boolean target)
          This method compares this type with the given type and checks based on the target flag whether the types can be converted to one another.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name of the collection type.
 java.lang.String getName()
          Returns a String representation for the collection type.
 int getType()
          Returns the collection type.
static boolean isCollectionType(int type)
          Indicates whether the type indicated by the specified type constants is a collection type.
 void setType(int type)
          Sets the collection type.
 java.lang.String toString()
          Returns the string representation of this collection type
 
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject
delete, export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setID, setLine, setLoaded, setResolved, setSerialNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.arc.brahms.common.data.Type
getSerialNumber
 

Field Detail

MAP_TYPE

public static final CollectionType MAP_TYPE
Constructor Detail

CollectionType

public CollectionType()
Constructor, creates a new undefined CollectionType


CollectionType

public CollectionType(int type)
Constructor, creates a new CollectionType for the specified type of collection.

Parameters:
type - the collection type
Method Detail

isCollectionType

public static final boolean isCollectionType(int type)
Indicates whether the type indicated by the specified type constants is a collection type.

Parameters:
type - the type constant to be tested
Returns:
boolean true if the type constant is for a collection type

setType

public void setType(int type)
Sets the collection type.

Parameters:
type - the type of collection

getType

public int getType()
Returns the collection type.

Specified by:
getType in interface Type
Returns:
int the type of collection

getName

public java.lang.String getName()
Returns a String representation for the collection type.

Specified by:
getName in interface Type
Returns:
String the name of the collection type

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
Returns the fully qualified name of the collection type. This is equal to the name of the type.

Specified by:
getFullyQualifiedName in interface Type
Returns:
String the fully qualified name

compareTypes

public boolean compareTypes(Type type,
                            boolean target)
This method compares this type with the given type and checks based on the target flag whether the types can be converted to one another. If target is true this method checks if the given type can be converted to or is compatible with this type. If target is false this method checks whether this type can be converted to or is compatible with the given type.

Specified by:
compareTypes in interface Type
Parameters:
type - the type to compare this type with
target - true if this type is the target false if the given type is the target
Returns:
boolean an true if the types are compatible, false otherwise

toString

public java.lang.String toString()
Returns the string representation of this collection type

Overrides:
toString in class java.lang.Object
Returns:
String the string representation of this type


Copyright © 1997-2012 All Rights Reserved.