org.apache.creadur.whisker.model
public class Resource extends Object implements Comparable<Resource>, ContentElement
Constructor and Description |
---|
Resource(String name,
String noticeId,
String source)
Constructs a resource in a software distribution.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accepts a visitor.
|
int |
compareTo(Resource other)
Based on name.
|
boolean |
equals(Object obj)
Based on name.
|
String |
getName()
Gets the name for this resource
expected in a software distribution.
|
String |
getNoticeId()
Gets an identifier for the optional NOTICE.
|
String |
getSource()
Gets a locator for the source.
|
int |
hashCode()
Based on name.
|
boolean |
hasSource()
Is this resource linked to source?
|
String |
toString()
Gets a description suitable for logging.
|
public Resource(String name, String noticeId, String source)
name
- not nullnoticeId
- identifies the notice for this resource,
null when there is no NOTICEsource
- describes how source may be obtained,
null when this is not neededpublic String getName()
public String getNoticeId()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
obj
- possibly nullObject.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public int compareTo(Resource other)
compareTo
in interface Comparable<Resource>
other
- Comparable.compareTo(java.lang.Object)
public void accept(Visitor visitor)
accept
in interface ContentElement
visitor
- possibly nullpublic String getSource()
public boolean hasSource()
Copyright © 2011-2013 Apache Software Foundation. All Rights Reserved.