public class ProtectedHashResource extends HashResource
isPropertyResource.Entry, Resource.Iterator| Constructor and Description |
|---|
ProtectedHashResource(HashResource baseHash) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkRange(Range range)
Determine if the element satisfies the given range constraint.
|
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 key)
Retrieve the Element associated with the given Term (either an index or
string key).
|
protected Map<String,Element> |
getBackingMap()
Override this method to return the map from the base hash.
|
int |
hashCode()
Require that all Elements implement the hashCode method.
|
boolean |
isProtected()
This method indicates if the given Element is protected.
|
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 key,
Element newValue)
Define the mapping between the given Term and given Element.
|
void |
rput(Term[] terms,
int index,
Element value)
Add the given child to this resource, creating intermediate resources as
necessary.
|
int |
size()
Get the number of elements in this Resource.
|
String |
toString()
Require that all Elements implement a reasonable toString method.
|
Element |
writableCopy()
This method returns a writable copy of this Element.
|
checkValidReplacement, getTypeAsStringcheckInvalidSelfContext, checkRestrictedContext, defined, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isResource, isString, isTransientpublic ProtectedHashResource(HashResource baseHash)
public Element duplicate()
Elementduplicate in class HashResourcepublic Element get(Term key) throws InvalidTermException
Resourceget in class HashResourcekey - 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 key, Element newValue) throws InvalidTermException
Resourceput in class HashResourcekey - 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()
Resourcesize in class HashResourcepublic Set<Term> keySet()
keySet in class HashResourcepublic String locateUndefinedElement()
ElementlocateUndefinedElement in class HashResourcepublic void checkRange(Range range) throws ValidationException
ElementcheckRange in class HashResourcerange - Range to check Element againstValidationException - if the element cannot be compared to a range or if the
element doesn't meet the range requirementpublic Element protect()
Elementprotect in class HashResourcepublic int hashCode()
ElementhashCode in class HashResourcepublic boolean equals(Object o)
Elementequals in class HashResourceprotected Map<String,Element> getBackingMap()
getBackingMap in class HashResourcepublic String toString()
ElementtoString in class HashResourcepublic Resource.Iterator iterator()
Resourceiterator in interface Iterable<Resource.Entry>iterator in class HashResourcepublic boolean isProtected()
ElementisProtected in class Elementpublic void rput(Term[] terms, int index, Element value) throws InvalidTermException
Elementrput in class ResourceInvalidTermException - thrown if an trying to dereference a list with a key or a
hash with an indexpublic Element writableCopy()
ElementwritableCopy in class ElementCopyright © 2014 Quattor. All Rights Reserved.