public class ProtectedListResource extends ListResource
isPropertyResource.Entry, Resource.Iterator| Constructor and Description |
|---|
ProtectedListResource(ListResource baseList) |
| 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 List<Element> |
getBackingList()
Override this method to return the list from the base list.
|
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.
|
String |
locateUndefinedElement()
Determine if the element contains any undefined (transient) elements.
|
Element |
protect()
Return a protected version of this Element.
|
Element |
put(int index,
Element newValue)
This is an optimized version of the put method which doesn't require
creating a Term object.
|
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.
|
append, checkValidReplacement, getTypeAsString, prependcheckInvalidSelfContext, checkRestrictedContext, defined, execute, exists, isBoolean, isDouble, isList, isLong, isNlist, isPersistent, isProperty, isResource, isString, isTransientpublic ProtectedListResource(ListResource baseList)
public Element duplicate()
Elementduplicate in class ListResourcepublic Element get(Term key) throws InvalidTermException
Resourceget in class ListResourcekey - 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 ListResourcekey - 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 Element put(int index, Element newValue)
ListResourceput in class ListResourceindex - index of the element to insertnewValue - value to insert into the listpublic int size()
Resourcesize in class ListResourcepublic Resource.Iterator iterator()
Resourceiterator in interface Iterable<Resource.Entry>iterator in class ListResourcepublic String locateUndefinedElement()
ElementlocateUndefinedElement in class ListResourcepublic void checkRange(Range range) throws ValidationException
ElementcheckRange in class ListResourcerange - 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 ListResourcepublic int hashCode()
ElementhashCode in class ListResourcepublic boolean equals(Object o)
Elementequals in class ListResourceprotected List<Element> getBackingList()
getBackingList in class ListResourcepublic String toString()
ElementtoString in class ListResourcepublic 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.