T
- The format (class) of object that the BasicObjectContainer
containspublic class BasicObjectContainer<T> extends java.lang.Object implements ObjectContainer<T>
Constructor and Description |
---|
BasicObjectContainer(FormatManager<T> fmtManager,
T obj)
Constructs a new BasicObjectContainer containing the single object
provided.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T obj)
Returns true if this ObjectContainer contains the given Object.
|
java.util.Collection<? extends T> |
getContainedObjects()
Returns a singleton Collection containing the one item in this
BasicObjectContainer.
|
java.lang.String |
getLSTformat(boolean useAny)
Returns a representation of this ObjectContainer, suitable for storing in
an LST file.
|
java.lang.Class<T> |
getReferenceClass()
Returns the Class indicating the type of object that this ObjectContainer
contains.
|
public BasicObjectContainer(FormatManager<T> fmtManager, T obj)
fmtManager
- The FormatManager usable to manage the given objectobj
- The single object that this BasicObjectContainer will containjava.lang.IllegalArgumentException
- if either argument is null or if the given object is not
compatible with the given FormatManagerpublic java.lang.String getLSTformat(boolean useAny)
getLSTformat
in interface ObjectContainer<T>
useAny
- indicates if the "ALL/ANY" collection should use "ANY"public java.lang.Class<T> getReferenceClass()
getReferenceClass
in interface ObjectContainer<T>
public java.util.Collection<? extends T> getContainedObjects()
getContainedObjects
in interface ObjectContainer<T>
ObjectContainer.getContainedObjects()
public boolean contains(T obj)
contains
in interface ObjectContainer<T>
obj
- The object to check if it is contained by this ObjectContainer