org.sonar.squid.entities
Class Resource

java.lang.Object
  extended by org.sonar.squid.entities.Resource
All Implemented Interfaces:
java.lang.Comparable<Resource>

public class Resource
extends java.lang.Object
implements java.lang.Comparable<Resource>


Nested Class Summary
static class Resource.Type
           
 
Constructor Summary
Resource(java.lang.String name, Resource.Type type)
           
 
Method Summary
 void addChild(Resource resource)
           
 int compareTo(Resource resource)
           
 void compute()
           
 boolean contains(Resource wantedRes, boolean recursive)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<Resource> find(Resource.Type resourceType)
           
 Resource find(Resource wantedRes)
           
 Resource find(java.lang.String resourceName, Resource.Type resourceType)
           
 java.util.Set<Resource> getChildren()
           
 Resource getFirstChild()
           
 java.lang.String getFullName()
           
 Resource getLastChild()
           
 Measures getMeasures()
           
 java.lang.String getName()
           
 Resource getParent()
           
 Resource.Type getType()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource(java.lang.String name,
                Resource.Type type)
Method Detail

addChild

public void addChild(Resource resource)

getMeasures

public Measures getMeasures()

getFirstChild

public Resource getFirstChild()

getLastChild

public Resource getLastChild()

compareTo

public int compareTo(Resource resource)
Specified by:
compareTo in interface java.lang.Comparable<Resource>

getName

public java.lang.String getName()

getFullName

public java.lang.String getFullName()

getType

public Resource.Type getType()

getParent

public Resource getParent()

getChildren

public java.util.Set<Resource> getChildren()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contains

public boolean contains(Resource wantedRes,
                        boolean recursive)

find

public Resource find(Resource wantedRes)

find

public Resource find(java.lang.String resourceName,
                     Resource.Type resourceType)

find

public java.util.Collection<Resource> find(Resource.Type resourceType)

compute

public final void compute()


Copyright © 2009 SonarSource SA. All Rights Reserved.