NetKernel APIs


org.ten60.netkernel.layer1.representation
Class MultiRepresentationImpl

java.lang.Object
  extended byorg.ten60.netkernel.layer1.representation.MultiRepresentationImpl
All Implemented Interfaces:
IURRepresentation

public final class MultiRepresentationImpl
extends Object
implements IURRepresentation

Implementation of IURRepresentation that can hold may IURAspects


Constructor Summary
MultiRepresentationImpl(IURMeta aMeta, int aInitialSize)
          Construct a new MultiRepresentationImpl
 
Method Summary
 void addAspect(IURAspect aAspect)
          Add an aspect to the representation
 void addAspectsOf(IURRepresentation aRepresentation)
          Add all aspects of another representation
 IURAspect getAspect(Class aAspectClass)
          Return the first aspect which implements the given interface class
 Collection getAspects()
          Return a collection of all unique aspects that this representation exhibits
 IURMeta getMeta()
          Return the meta for this representation
 boolean hasAspect(Class aAspectClass)
          Return true if this representation can return an aspect which implements the given interface
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiRepresentationImpl

public MultiRepresentationImpl(IURMeta aMeta,
                               int aInitialSize)
Construct a new MultiRepresentationImpl

Parameters:
aMeta - the meta the representation should hold
aInitialSize - the initial size of the list to hold aspects
Method Detail

addAspect

public void addAspect(IURAspect aAspect)
Add an aspect to the representation

Parameters:
aAspect - the aspect to add

addAspectsOf

public void addAspectsOf(IURRepresentation aRepresentation)
Add all aspects of another representation

Parameters:
aRepresentation - the other representation

getMeta

public IURMeta getMeta()
Description copied from interface: IURRepresentation
Return the meta for this representation

Specified by:
getMeta in interface IURRepresentation
Returns:
the meta

hasAspect

public boolean hasAspect(Class aAspectClass)
Return true if this representation can return an aspect which implements the given interface

Specified by:
hasAspect in interface IURRepresentation
Parameters:
aAspectClass - a IURAspect class object for an aspect to test for
Returns:
true if any of the aspects which this representation holds implement the given interface

getAspect

public IURAspect getAspect(Class aAspectClass)
Return the first aspect which implements the given interface class

Specified by:
getAspect in interface IURRepresentation
Returns:
the aspect, null if none is found

getAspects

public Collection getAspects()
Return a collection of all unique aspects that this representation exhibits

Specified by:
getAspects in interface IURRepresentation

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.