|
SVNKit Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tmatesoft.svn.core.SVNProperties
The SVNProperties class represents an object wrapper for String to
SVNPropertyValue mappings where String keys represent property names and
values - property values wrapped in SVNPropertyValue objects.
This class is backed by a Map object and brings specific methods useful for working with
version controlled properties.
Objects of this type are modifiable.
| Constructor Summary | |
SVNProperties()
Creates an empty SVNProperties object. |
|
SVNProperties(SVNProperties properties)
Creates a new SVNProperties object copying the given one. |
|
| Method Summary | |
Map |
asMap()
Returns SVNProperties as Map of String, SVNPropertyValue pairs. |
void |
clear()
Removes all properties from this object. |
Object |
clone()
Creates and returns a copy of this object. |
SVNProperties |
compareTo(SVNProperties properties)
Compares this object against another one returning a difference between them. |
boolean |
containsName(String propertyName)
Tells whether this properties object contains the specified property name. |
boolean |
containsValue(SVNPropertyValue value)
Tells whether this properties object contains the specified property value. |
boolean |
equals(Object obj)
Tells whether this object and obj are equal. |
byte[] |
getBinaryValue(String propertyName)
Returns a binary property value. |
SVNProperties |
getRegularProperties()
Returns a subset of properties contained in this properties object which suffice for SVNProperty.isRegularProperty(String) clause. |
String |
getStringValue(String propertyName)
Returns a String property value. |
SVNPropertyValue |
getSVNPropertyValue(String propertyName)
Returns a property value as an SVNPropertyValue. |
int |
hashCode()
Returns a hash code of this object. |
boolean |
isEmpty()
Tells if this properties object holds no properties (empty). |
Set |
nameSet()
Returns a set of property names contained by this object. |
void |
put(String propertyName,
byte[] propertyValue)
Stores a new property name-to-value mapping in this object. |
void |
put(String propertyName,
String propertyValue)
Stores a new property name-to-value mapping in this object. |
void |
put(String propertyName,
SVNPropertyValue propertyValue)
Stores a new mapping propertyName to propertyValue in
this object. |
void |
putAll(SVNProperties properties)
Puts all properties from the specified properties object to this object. |
SVNPropertyValue |
remove(String propertyName)
Removes the specified property from this properties object. |
void |
removeNullValues()
Removes all mappings which values are nulls from this object. |
int |
size()
Returns the number of properties held by this object. |
static SVNProperties |
unmodifiableProperties(SVNProperties properties)
Returns an unmodifiable view of the specified properties.
|
Collection |
values()
Returns a collection of property values contained in this properties object. |
static SVNProperties |
wrap(Map map)
Creates a new SVNProperties object wrapping a given map with properties.
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SVNProperties()
SVNProperties object.
public SVNProperties(SVNProperties properties)
SVNProperties object copying the given one.
properties - an initializer| Method Detail |
public static SVNProperties wrap(Map map)
SVNProperties object wrapping a given map with properties.
map is not stored by this object, instead its contents are copied into a new
Map object (which will be backed by a new SVNProperties object)
according to the following rules:
String, then it's wrapped into SVNPropertyValue using
the SVNPropertyValue.create(String) method;
if the value is of type byte[], then it's wrapped into SVNPropertyValue using
the SVNPropertyValue.create(String, byte[]) method;
if the value is of type SVNPropertyValue, then it's not copied but is put into a new map
as is;
map - initial map holding properties
SVNProperties object; if map is
null, returns an empty SVNProperties object
created as new SVNProperties()SVNProperties()public static SVNProperties unmodifiableProperties(SVNProperties properties)
properties.
Any attempt to modify the returned SVNProperties object result in an
UnsupportedOperationException.
properties - SVNProperties object for which an unmodifiable view is to be returned.
public Map asMap()
public void put(String propertyName,
SVNPropertyValue propertyValue)
propertyName to propertyValue in
this object.
propertyName - property namepropertyValue - property value object
public void put(String propertyName,
String propertyValue)
propertyValue is converted to an SVNPropertyValue object through
a call to SVNPropertyValue.create(String).
propertyName - property namepropertyValue - property value string
public void put(String propertyName,
byte[] propertyValue)
propertyValue is converted to an SVNPropertyValue object through
a call to SVNPropertyValue.create(String, byte[]).
propertyName - property namepropertyValue - property value bytespublic String getStringValue(String propertyName)
String property value.
propertyName - property name
String property valuepublic byte[] getBinaryValue(String propertyName)
propertyName - property name
public SVNPropertyValue getSVNPropertyValue(String propertyName)
SVNPropertyValue.
propertyName - property name
public SVNPropertyValue remove(String propertyName)
propertyName - name of the property to remove from this object
public void putAll(SVNProperties properties)
properties - properties objectpublic boolean isEmpty()
public void clear()
public void removeNullValues()
public int size()
public boolean containsName(String propertyName)
propertyName - property name
propertyName)public Set nameSet()
public boolean containsValue(SVNPropertyValue value)
value - property value
valuepublic Collection values()
public SVNProperties getRegularProperties()
SVNProperty.isRegularProperty(String) clause.
SVNProperties object is returnedpublic SVNProperties compareTo(SVNProperties properties)
properties, are put to
the result as property name to null mappings. Properties which are
present only in properties but not in this object, are added to the result. Also result will
include those properties which are present in both objects but have different values; in this case result
will include such properties with values from properties.
properties - another properties object
public int hashCode()
31 + hash code of the
underlying Map holding the property key to property value mappings.
public boolean equals(Object obj)
obj are equal.
obj - object to compare with
obj is either this very object,
or is an instance of SVNProperties with the same contents of properties
public Object clone()
throws CloneNotSupportedException
CloneNotSupportedException
|
SVNKit Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||