org.osgi.impl.bundle.obr.resource
Class RequirementImpl

java.lang.Object
  extended by org.osgi.impl.bundle.obr.resource.RequirementImpl
All Implemented Interfaces:
Requirement

public class RequirementImpl
extends Object
implements Requirement

Implements the Requirement interface.

Version:
$Revision: 44 $

Constructor Summary
RequirementImpl(String name)
          Create a requirement with the given name.
RequirementImpl(org.xmlpull.v1.XmlPullParser parser)
          Parse the requirement from the pull parser.
 
Method Summary
 boolean equals(Object o)
           
 String getComment()
           
 String getFilter()
          Return the filter.
 String getName()
          Return the name of the requirement.
 int hashCode()
           
 boolean isExtend()
           
 boolean isMultiple()
           
 boolean isOptional()
           
 boolean isSatisfied(Capability capability)
           
 void setComment(String comment)
           
 void setExtend(boolean extend)
           
 void setFilter(String filter)
           
 void setMultiple(boolean b)
           
 void setOptional(boolean b)
           
 String toString()
           
static Tag toXML(Requirement requirement)
           
 Tag toXML(String name)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequirementImpl

public RequirementImpl(String name)
Create a requirement with the given name.

Parameters:
name -

RequirementImpl

public RequirementImpl(org.xmlpull.v1.XmlPullParser parser)
                throws Exception
Parse the requirement from the pull parser.

Parameters:
parser -
Throws:
Exception
Method Detail

setFilter

public void setFilter(String filter)

getFilter

public String getFilter()
Description copied from interface: Requirement
Return the filter.

Specified by:
getFilter in interface Requirement

toXML

public Tag toXML(String name)

getName

public String getName()
Description copied from interface: Requirement
Return the name of the requirement.

Specified by:
getName in interface Requirement

isSatisfied

public boolean isSatisfied(Capability capability)
Specified by:
isSatisfied in interface Requirement

toString

public String toString()
Overrides:
toString in class Object

getComment

public String getComment()
Specified by:
getComment in interface Requirement

setComment

public void setComment(String comment)

toXML

public static Tag toXML(Requirement requirement)

isMultiple

public boolean isMultiple()
Specified by:
isMultiple in interface Requirement

isOptional

public boolean isOptional()
Specified by:
isOptional in interface Requirement

setOptional

public void setOptional(boolean b)

setMultiple

public void setMultiple(boolean b)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isExtend

public boolean isExtend()
Specified by:
isExtend in interface Requirement

setExtend

public void setExtend(boolean extend)


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.