public class HashResource extends Resource
isPropertyResource.Entry, Resource.Iterator| Modifier | Constructor and Description |
|---|---|
|
HashResource() |
protected |
HashResource(HashResource source)
This constructor creates a shallow copy of the given HashResource.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkRange(Range range)
Determine if the element satisfies the given range constraint.
|
void |
checkValidReplacement(Element newValue)
Check that the newValue is a valid replacement for the this value.
|
Element |
duplicate()
This method does a "clone" of the given Element.
|
boolean |
equals(Object o)
Require that all Elements implement an equals method.
|
Element |
get(Term term)
Retrieve the Element associated with the given Term (either an index or
string key).
|
protected Map<String,Element> |
getBackingMap()
This method is used to access the underlying map used to store the hash
information.
|
String |
getTypeAsString()
All Elements must return a string describing its type.
|
int |
hashCode()
Require that all Elements implement the hashCode method.
|
Resource.Iterator |
iterator()
Get an iterator which allows to run over the resources in the Resource.
|
Set<Term> |
keySet() |
String |
locateUndefinedElement()
Determine if the element contains any undefined (transient) elements.
|
Element |
protect()
Return a protected version of this Element.
|
Element |
put(Term term,
Element newValue)
Define the mapping between the given Term and given Element.
|
int |
size()
Get the number of elements in this Resource.
|
String |
toString()
Require that all Elements implement a reasonable toString method.
|
checkInvalidSelfContext, checkRestrictedContext, defined, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isProtected, isResource, isString, isTransient, writableCopypublic HashResource()
protected HashResource(HashResource source)
source - HashResource to copypublic Element duplicate()
Elementpublic Element get(Term term) throws InvalidTermException
Resourceget in class Resourceterm - Term which acts as the key for the desired ElementInvalidTermException - thrown if the term is not of the appropriate type for the
resource; the message should contain the string
representation of the termpublic Element put(Term term, Element newValue) throws InvalidTermException
Resourceput in class Resourceterm - Term which acts as the key for the desired ElementnewValue - Element to associate with the given TermInvalidTermException - thrown if the term is not of the appropriate type for the
resource; the message should contain the string
representation of the termpublic int size()
Resourcepublic String locateUndefinedElement()
ElementlocateUndefinedElement in class Elementpublic void checkRange(Range range) throws ValidationException
ElementcheckRange in class Elementrange - Range to check Element againstValidationException - if the element cannot be compared to a range or if the
element doesn't meet the range requirementpublic void checkValidReplacement(Element newValue) throws EvaluationException
ElementcheckValidReplacement in class ElementnewValue - the new value for the replacementEvaluationException - if the new value is not a valid replacement of the existing
valuepublic Element protect()
Elementpublic String getTypeAsString()
ElementgetTypeAsString in class Elementpublic int hashCode()
Elementpublic boolean equals(Object o)
Elementprotected Map<String,Element> getBackingMap()
public String toString()
Elementpublic Resource.Iterator iterator()
Resourceiterator in interface Iterable<Resource.Entry>iterator in class ResourceCopyright © 2014 Quattor. All Rights Reserved.