FileDocCategorySizeDatePackage
IORTemplateImpl.javaAPI DocJava SE 5 API3177Fri Aug 26 14:54:22 BST 2005com.sun.corba.se.impl.ior

IORTemplateImpl

public class IORTemplateImpl extends com.sun.corba.se.spi.ior.IdentifiableContainerBase implements com.sun.corba.se.spi.ior.IORTemplate
This class is a container of TaggedProfileTemplates.
author

Fields Summary
private com.sun.corba.se.spi.ior.ObjectKeyTemplate
oktemp
Constructors Summary
public IORTemplateImpl(com.sun.corba.se.spi.ior.ObjectKeyTemplate oktemp)

	this.oktemp = oktemp ;
    
public IORTemplateImpl(org.omg.CORBA_2_3.portable.InputStream is)

	ORB orb = (ORB)(is.orb()) ;
    	IdentifiableFactoryFinder finder = 
	    orb.getTaggedProfileTemplateFactoryFinder() ;

	oktemp = orb.getObjectKeyFactory().createTemplate( is ) ;
	EncapsulationUtility.readIdentifiableSequence( this, finder, is ) ;

	makeImmutable() ;
    
Methods Summary
public booleanequals(java.lang.Object obj)

	if (obj == null)
	    return false ;

	if (!(obj instanceof IORTemplateImpl))
	    return false ;

	IORTemplateImpl other = (IORTemplateImpl)obj ;

	return super.equals( obj ) && oktemp.equals( other.getObjectKeyTemplate() ) ;
    
public com.sun.corba.se.spi.ior.ObjectKeyTemplategetObjectKeyTemplate()

	return oktemp ;
    
public inthashCode()

	return super.hashCode() ^ oktemp.hashCode() ;
    
public booleanisEquivalent(com.sun.corba.se.spi.ior.IORFactory other)

	if (!(other instanceof IORTemplate))
	    return false ;

	IORTemplate list = (IORTemplate)other ;

	Iterator thisIterator = iterator() ;
	Iterator listIterator = list.iterator() ;
	while (thisIterator.hasNext() && listIterator.hasNext()) {
	    TaggedProfileTemplate thisTemplate = 
		(TaggedProfileTemplate)thisIterator.next() ;
	    TaggedProfileTemplate listTemplate = 
		(TaggedProfileTemplate)listIterator.next() ;
	    if (!thisTemplate.isEquivalent( listTemplate ))
		return false ;
	}

	return (thisIterator.hasNext() == listIterator.hasNext()) &&
	    getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
    
public com.sun.corba.se.spi.ior.IORmakeIOR(com.sun.corba.se.spi.orb.ORB orb, java.lang.String typeid, com.sun.corba.se.spi.ior.ObjectId oid)

	return new IORImpl( orb, typeid, this, oid ) ;
    
public voidmakeImmutable()
Ensure that this IORTemplate and all of its profiles can not be modified. This overrides the method inherited from FreezableList through IdentifiableContainerBase.

	makeElementsImmutable() ;
	super.makeImmutable() ;
    
public voidwrite(org.omg.CORBA_2_3.portable.OutputStream os)

	oktemp.write( os ) ;
	EncapsulationUtility.writeIdentifiableSequence( this, os ) ;