com.endeca.itl.cas.api
Class ModuleProperty

java.lang.Object
  extended by com.endeca.itl.cas.api.ModuleProperty
All Implemented Interfaces:
Comparable<ModuleProperty>

public class ModuleProperty
extends Object
implements Comparable<ModuleProperty>

A ModuleProperty is a key/value-list pair used to provide configuration information about a particular module (such as a content source or output destination).


Constructor Summary
ModuleProperty()
           
ModuleProperty(String key, String... values)
           
 
Method Summary
 void addValues(String... values)
          Adds values to this ModuleProperty
 int compareTo(ModuleProperty other)
          A comparison of keys first, then values.
 boolean equals(Object other)
           
 String getKey()
          Gets the value of the key property.
 String getSingletonValue()
           
 List<String> getValues()
           
 int hashCode()
           
 boolean hasValues()
           
 void setKey(String key)
          Sets the value of the key property.
 void setValues(List<String> values)
          Update the list holding the values for the property.
 void setValues(String... values)
          Sets the values of this ModuleProperty to the argument values.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleProperty

public ModuleProperty()

ModuleProperty

public ModuleProperty(String key,
                      String... values)
Method Detail

getKey

public String getKey()
Gets the value of the key property.


setKey

public void setKey(String key)
Sets the value of the key property.


getValues

public List<String> getValues()
Returns:
list of values for the property.

setValues

public void setValues(List<String> values)
Update the list holding the values for the property.

Parameters:
values -

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

setValues

public void setValues(String... values)
Sets the values of this ModuleProperty to the argument values.

Parameters:
values -

addValues

public void addValues(String... values)
Adds values to this ModuleProperty

Parameters:
values -

getSingletonValue

public String getSingletonValue()
Returns:
the single value of this module property
Throws:
IllegalStateException - if this module property has multiple values.

hasValues

public boolean hasValues()

compareTo

public int compareTo(ModuleProperty other)
A comparison of keys first, then values. Handles null keys and values, but not a null object

Specified by:
compareTo in interface Comparable<ModuleProperty>


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.