com.edustructures.sifworks.food
Class FSAmounts

java.lang.Object
  extended by com.edustructures.sifworks.Element
      extended by com.edustructures.sifworks.SIFElement
          extended by com.edustructures.sifworks.SIFList<T>
              extended by com.edustructures.sifworks.SIFKeyedList<FSAmount>
                  extended by com.edustructures.sifworks.food.FSAmounts
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<FSAmount>, java.util.Collection<FSAmount>

public class FSAmounts
extends SIFKeyedList<FSAmount>

Since:
1.5r1
Version:
2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.edustructures.sifworks.Element
CURRENT_SERIALIZE_VERSION
 
Constructor Summary
FSAmounts()
          Constructor
FSAmounts(FSAmount amount)
          Constructor that accepts values for all mandatory fields
 
Method Summary
 void addAmount(FSAmountType type, java.math.BigDecimal credits, java.lang.String value)
          Adds a new <Amount> repeatable element.
 FSAmount getAmount(java.lang.String value)
          Gets a FSAmount object instance.
 FSAmount[] getAmounts()
          Gets all FSAmount object instances.
 void removeAmount(java.lang.String value)
          Removes a FSAmount object instance.
 void setAmounts(FSAmount[] amounts)
          Sets an array of FSAmount objects.
 
Methods inherited from class com.edustructures.sifworks.SIFKeyedList
getChild, getChild
 
Methods inherited from class com.edustructures.sifworks.SIFList
add, addAll, clear, contains, containsAll, get, iterator, remove, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class com.edustructures.sifworks.SIFElement
addChild, addChild, clone, compareGraphTo, create, effectiveSIFVersion, getChild, getChild, getChild, getChildCount, getChildList, getChildList, getChildList, getChildren, getChildren, getContent, getContent, getField, getField, getFieldCount, getFields, getFieldValue, getKey, getSIFValue, getSIFVersion, getTextValue, getXmlId, hasTextValue, removeChild, removeChild, removeChild, removeChild, restoreImplementationDef, setChanged, setChildren, setEmpty, setField, setField, setField, setField, setSIFValue, setSIFVersion, setTextValue, setXmlId, tag
 
Methods inherited from class com.edustructures.sifworks.Element
compareTo, getElementDef, getParent, getRoot, isChanged, isDoNotEncode, isEmpty, setChanged, setDoNotEncode, setElementDef, setEmpty, setParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode, isEmpty
 

Constructor Detail

FSAmounts

public FSAmounts()
Constructor


FSAmounts

public FSAmounts(FSAmount amount)
Constructor that accepts values for all mandatory fields

Parameters:
amount -
Method Detail

addAmount

public void addAmount(FSAmountType type,
                      java.math.BigDecimal credits,
                      java.lang.String value)
Adds a new <Amount> repeatable element. This form of setAmount is provided as a convenience method that is functionally equivalent to the version of setAmount that accepts a single FSAmount object.

Parameters:
type - Type of amount. The currency unit is implied; namely USD. Note that when this common element is used not all of the following values apply. There are notes to indicate values that are applicable.
credits - Number of credits. This attribute does not apply to Cash or Value and hence has a value 0. It only applies to types BreakfastCredit and LunchCredit.
value - Gets or sets the content value of the <FSAmount> element
Since:
1.5r1

removeAmount

public void removeAmount(java.lang.String value)
Removes a FSAmount object instance. More than one instance can be defined for this object because it is a repeatable field element.

Parameters:
value - Identifies the FSAmount object to remove by its Value value
Since:
1.5r1

getAmount

public FSAmount getAmount(java.lang.String value)
Gets a FSAmount object instance. More than one instance can be defined for this object because it is a repeatable field element.

Parameters:
value - Identifies the FSAmount object to return by its "Value" attribute value
Returns:
A FSAmount object
Since:
1.5r1

getAmounts

public FSAmount[] getAmounts()
Gets all FSAmount object instances. More than one instance can be defined for this object because it is a repeatable field element.

Returns:
An array of FSAmount objects
Since:
1.5r1

setAmounts

public void setAmounts(FSAmount[] amounts)
Sets an array of FSAmount objects. All existing FSAmount instances are removed and replaced with this list. Calling this method with the parameter value set to null removes all FSAmounts.

Since:
1.5r1


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.