AR System Java API

com.bmc.arsys.api
Class DiaryListValue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<DiaryItem>
              extended by com.bmc.arsys.api.DiaryListValue
All Implemented Interfaces:
Serializable, Cloneable, Iterable<DiaryItem>, Collection<DiaryItem>, List<DiaryItem>, RandomAccess

public class DiaryListValue
extends ArrayList<DiaryItem>
implements Cloneable, Serializable

The DiaryListValue class is used to set or retrieve the values of diary fields. The DiaryList class is a collection of DiaryItem objects. It contains a string representation of all the DiaryItem objects in encoded form. The list of DiaryItem objects can be retrieved using the decode method.

See Also:
Serialized Form

Field Summary
static String AR_DEFN_DIARY_COMMA
           
static String AR_DEFN_DIARY_SEP
           
 
Constructor Summary
DiaryListValue()
           
 
Method Summary
 Object clone()
          Clone implementation that returns an Object with data cloned from self.
static DiaryListValue decode(String encoded)
          Takes the formatted string returned for all diary fields and decodes it into an array of diary entries.
 String encode()
          Encodes the current ARDiaryList into an encoded diary string.
 boolean equals(Object obj)
          Use this method for checking equality between the current object and the provided one.
 String getAppendedText()
          return the appended diary string.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 void setAppendedText(String appendedText)
          Append the given string to the diaryListValue object, and the string will be added to DiaryItem late on when this diaryListValue object is saved into the server
 String toString()
          Returns a string description of the object.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

AR_DEFN_DIARY_SEP

public static final String AR_DEFN_DIARY_SEP

AR_DEFN_DIARY_COMMA

public static final String AR_DEFN_DIARY_COMMA
Constructor Detail

DiaryListValue

public DiaryListValue()
Method Detail

equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Specified by:
equals in interface Collection<DiaryItem>
Specified by:
equals in interface List<DiaryItem>
Overrides:
equals in class AbstractList<DiaryItem>
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

decode

public static DiaryListValue decode(String encoded)
                             throws ARException
Takes the formatted string returned for all diary fields and decodes it into an array of diary entries.

Throws:
NullPointerException - if invalid ARServerUser object
ARException - if diary information is not decoded

encode

public String encode()
Encodes the current ARDiaryList into an encoded diary string.

Returns:
a populated string

clone

public Object clone()
Clone implementation that returns an Object with data cloned from self.

Overrides:
clone in class ArrayList<DiaryItem>

getAppendedText

public String getAppendedText()
return the appended diary string.


setAppendedText

public void setAppendedText(String appendedText)
Append the given string to the diaryListValue object, and the string will be added to DiaryItem late on when this diaryListValue object is saved into the server

Parameters:
appendedText - the string to be added to the diaryListValue object.

toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class AbstractCollection<DiaryItem>

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Specified by:
hashCode in interface Collection<DiaryItem>
Specified by:
hashCode in interface List<DiaryItem>
Overrides:
hashCode in class AbstractList<DiaryItem>
Returns:
returns the hash code for this instance

AR System Java API

? Copyright 2006, 2007 BMC Software, Inc.