de.fu_berlin.ties
Class TiesConfiguration.EntryDescriptor

java.lang.Object
  extended byde.fu_berlin.ties.TiesConfiguration.EntryDescriptor
Enclosing class:
TiesConfiguration

public final class TiesConfiguration.EntryDescriptor
extends Object

An inner class wrapping descriptor information on an entry: type of the entry, whether it is optional or a list, a description of the entry.


Method Summary
 String getDescription()
          Returns a textual description of the entry.
 String getElement(int index)
          Reads the value of this property as a string list and returns the element at the specified position.
 List getElementsFrom(int fromIndex)
          Reads the value of this property as a string list and returns a sublist starting at the specified position.
 String getKey()
          Returns the key (name) of this entry.
 String getType()
          Returns the base type of the entry (String, Integer etc.).
 Object getValue()
          Returns the value of this property (as an object).
 boolean isList()
          Whether the entry is a list (can contain multiple values).
 boolean isOptional()
          Whether the entry is optional.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDescription

public String getDescription()
Returns a textual description of the entry.

Returns:
the value of the attribute

getElement

public String getElement(int index)
                  throws IndexOutOfBoundsException
Reads the value of this property as a string list and returns the element at the specified position.

Parameters:
index - the index of element to return
Returns:
the element at the specified position in this list; or null if the position does not exist in the list or no value exists for this key
Throws:
IndexOutOfBoundsException - if index < 0

getElementsFrom

public List getElementsFrom(int fromIndex)
                     throws IndexOutOfBoundsException
Reads the value of this property as a string list and returns a sublist starting at the specified position.

Parameters:
fromIndex - the index of the first element to return (inclusive)
Returns:
a sublist starting at the specified position in this list; or null if the position does not exist in the list or no value exists for this key
Throws:
IndexOutOfBoundsException - if fromIndex < 0

getKey

public String getKey()
Returns the key (name) of this entry.

Returns:
the value of the attribute

getType

public String getType()
Returns the base type of the entry (String, Integer etc.).

Returns:
the value of the attribute

getValue

public Object getValue()
Returns the value of this property (as an object).

Returns:
the value of this property; or null if no value is set

isList

public boolean isList()
Whether the entry is a list (can contain multiple values).

Returns:
the value of the attribute

isOptional

public boolean isOptional()
Whether the entry is optional.

Returns:
the value of the attribute

toString

public String toString()
Returns a string representation of this object.

Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.