org.talend.esb.servicelocator.client
Class SLPropertiesImpl

java.lang.Object
  extended by org.talend.esb.servicelocator.client.SLPropertiesImpl
All Implemented Interfaces:
Serializable, SLProperties

public class SLPropertiesImpl
extends Object
implements SLProperties

Implementation of SLProperties backed by a Map. In addition to the methods exposed in SLProperties it also offers the methods addProperty(String, Iterable) and {@link #addProperty(String, String...) to actually add properties.

See Also:
Serialized Form

Field Summary
static SLProperties EMPTY_PROPERTIES
           
 
Constructor Summary
SLPropertiesImpl()
           
 
Method Summary
 void addProperty(String name, Iterable<String> values)
          Add a property with the given name and the given collection of values to this Properties object.
 void addProperty(String name, String... values)
          Add a property with the given name and the given list of values to this Properties object.
 Collection<String> getPropertyNames()
          
 Collection<String> getValues(String name)
          
 boolean hasProperty(String name)
          
 boolean includesValues(String name, Collection<String> values)
          
 boolean includesValues(String name, String... values)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_PROPERTIES

public static final SLProperties EMPTY_PROPERTIES
Constructor Detail

SLPropertiesImpl

public SLPropertiesImpl()
Method Detail

addProperty

public void addProperty(String name,
                        String... values)
Add a property with the given name and the given list of values to this Properties object. Name and values are trimmed before the property is added.

Parameters:
name - the name of the property, must not be null.
values - the values of the property, must no be null, none of the values must be null

addProperty

public void addProperty(String name,
                        Iterable<String> values)
Add a property with the given name and the given collection of values to this Properties object. Name and values are trimmed before the property is added.

Parameters:
name - the name of the property, must not be null.
values - the values of the property, must no be null, none of the values must be null

getPropertyNames

public Collection<String> getPropertyNames()

Specified by:
getPropertyNames in interface SLProperties

hasProperty

public boolean hasProperty(String name)

Specified by:
hasProperty in interface SLProperties

getValues

public Collection<String> getValues(String name)

Specified by:
getValues in interface SLProperties

includesValues

public boolean includesValues(String name,
                              String... values)

Specified by:
includesValues in interface SLProperties

includesValues

public boolean includesValues(String name,
                              Collection<String> values)

Specified by:
includesValues in interface SLProperties


Copyright © 2011-2013 Talend Inc.. All Rights Reserved.