com.sap.aii.proxy.xiruntime.core

Class BaseList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by com.sap.aii.proxy.xiruntime.core.BaseList
All Implemented Interfaces:
Serializable, Iterable, Collection, List

public abstract class BaseList
extends AbstractList
implements Serializable

Class implementing the functionality of a list while enforcing type security. From this class the list implementations for XML-specific lists are derived.

Copyright (c) 2001 SAP AG

See Also:
XmlBaseList, Serialized Form

Field Summary
protected  Class itemClass
          Java class of the items contained in this list (is the same for all items)
protected  XsdlElementProperties properties
          Properties of the associated XML element
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
BaseList(XsdlElementProperties properties)
           
 
Method Summary
 boolean addAsBoolean(boolean v)
          appends the specified boolean value to the end of this list
 void addAsBoolean(int index, boolean v)
          inserts the specified boolean value at the specified position in this list
 boolean addAsByte(byte v)
          appends the specified byte value to the end of this list
 void addAsByte(int index, byte v)
          inserts the specified byte value at the specified position in this list
 boolean addAsDouble(double v)
          appends the specified double value to the end of this list
 void addAsDouble(int index, double v)
          inserts the specified double value at the specified position in this list
 boolean addAsFloat(float v)
          appends the specified float value to the end of this list
 void addAsFloat(int index, float v)
          inserts the specified float value at the specified position in this list
 boolean addAsInt(int v)
          appends the specified int value to the end of this list
 void addAsInt(int index, int v)
          inserts the specified int value at the specified position in this list
 void addAsLong(int index, long v)
          inserts the specified long value at the specified position in this list
 boolean addAsLong(long v)
          appends the specified long value to the end of this list
 void addAsShort(int index, short v)
          inserts the specified short value at the specified position in this list
 boolean addAsShort(short v)
          appends the specified short value to the end of this list
protected  Object checkType(Object o)
          checks whether the given object is of the type permitted for elements of list.
 boolean containsAsBoolean(boolean v)
          returns true if this list contains the specified boolean value
 boolean containsAsByte(byte v)
          returns true if this list contains the specified byte value
 boolean containsAsDouble(double v)
          returns true if this list contains the specified double value
 boolean containsAsFloat(float v)
          returns true if this list contains the specified float value
 boolean containsAsInt(int v)
          returns true if this list contains the specified int value
 boolean containsAsLong(long v)
          returns true if this list contains the specified long value
 boolean containsAsShort(short v)
          returns true if this list contains the specified short value
 boolean getAsBoolean(int index)
          returns the boolean value at the specified position in this list
 byte getAsByte(int index)
          returns the byte value at the specified position in this list
 double getAsDouble(int index)
          returns the double value at the specified position in this list
 float getAsFloat(int index)
          returns the float value at the specified position in this list
 int getAsInt(int index)
          returns the int value at the specified position in this list
 long getAsLong(int index)
          returns the long value at the specified position in this list
 short getAsShort(int index)
          returns the short value at the specified position in this list
 XsdlElementProperties getElementProperties()
          returns the properties of the XML element associated with the list
 String getItemType()
          returns the type of the record items in this list
 int indexOf(Object o)
          returns the index in this list of the first occurrence of the specified element, of -1 if this list does not contain the element
 int indexOfAsBoolean(boolean v)
          returns the index in this list of the first occurrence of the specified boolean value, of -1 if this list does not contain the boolean value
 int indexOfAsByte(byte v)
          returns the index in this list of the first occurrence of the specified byte value, of -1 if this list does not contain the byte value
 int indexOfAsDouble(double v)
          returns the index in this list of the first occurrence of the specified double value, of -1 if this list does not contain the double value
 int indexOfAsFloat(float v)
          returns the index in this list of the first occurrence of the specified float value, of -1 if this list does not contain the float value
 int indexOfAsInt(int v)
          returns the index in this list of the first occurrence of the specified int value, of -1 if this list does not contain the int value
 int indexOfAsLong(long v)
          returns the index in this list of the first occurrence of the specified long value, of -1 if this list does not contain the long value
 int indexOfAsShort(short v)
          returns the index in this list of the first occurrence of the specified short value, of -1 if this list does not contain the short value
 int lastIndexOf(Object o)
          returns the index in this list of the last occurrence of the specified element, of -1 if this list does not contain the element
 int lastIndexOfAsBoolean(boolean v)
          returns the index in this list of the last occurrence of the specified boolean value, of -1 if this list does not contain the boolean value
 int lastIndexOfAsByte(byte v)
          returns the index in this list of the last occurrence of the specified byte value, of -1 if this list does not contain the byte value
 int lastIndexOfAsDouble(double v)
          returns the index in this list of the last occurrence of the specified double value, of -1 if this list does not contain the double value
 int lastIndexOfAsFloat(float v)
          returns the index in this list of the last occurrence of the specified float value, of -1 if this list does not contain the float value
 int lastIndexOfAsInt(int v)
          returns the index in this list of the last occurrence of the specified int value, of -1 if this list does not contain the int value
 int lastIndexOfAsLong(long v)
          returns the index in this list of the last occurrence of the specified long value, of -1 if this list does not contain the long value
 int lastIndexOfAsShort(short v)
          returns the index in this list of the last occurrence of the specified short value, of -1 if this list does not contain the short value
abstract  Object remove(int index)
          removes the element at the specified position in this list
 boolean removeAsBoolean(boolean v)
          removes the first occurrence in this list of the specified boolean value
 boolean removeAsBooleanAt(int index)
          removes the boolean value at the specified position in this list
 boolean removeAsByte(byte v)
          removes the first occurrence in this list of the specified byte value
 byte removeAsByteAt(int index)
          removes the byte value at the specified position in this list
 boolean removeAsDouble(double v)
          removes the first occurrence in this list of the specified double value
 double removeAsDoubleAt(int index)
          removes the double value at the specified position in this list
 boolean removeAsFloat(float v)
          removes the first occurrence in this list of the specified float value
 float removeAsFloatAt(int index)
          removes the float value at the specified position in this list
 boolean removeAsInt(int v)
          removes the first occurrence in this list of the specified int value
 int removeAsIntAt(int index)
          removes the int value at the specified position in this list
 boolean removeAsLong(long v)
          removes the first occurrence in this list of the specified long value
 long removeAsLongAt(int index)
          removes the long value at the specified position in this list
 boolean removeAsShort(short v)
          removes the first occurrence in this list of the specified short value
 short removeAsShortAt(int index)
          removes the short value at the specified position in this list
 boolean setAsBoolean(int index, boolean v)
          replaces the boolean value at the specified position in this list with the specified boolean value
 byte setAsByte(int index, byte v)
          replaces the byte value at the specified position in this list with the specified byte value
 double setAsDouble(int index, double v)
          replaces the double value at the specified position in this list with the specified double value
 float setAsFloat(int index, float v)
          replaces the float value at the specified position in this list with the specified float value
 int setAsInt(int index, int v)
          replaces the int value at the specified position in this list with the specified int value
 long setAsLong(int index, long v)
          replaces the long value at the specified position in this list with the specified long value
 short setAsShort(int index, short v)
          replaces the short value at the specified position in this list with the specified short value
abstract  int size()
          returns the current number of records in this list
 boolean[] toArrayAsBoolean()
          returns an array containing all of the boolean values in this list in proper sequence
 byte[] toArrayAsByte()
          returns an array containing all of the byte values in this list in proper sequence
 double[] toArrayAsDouble()
          returns an array containing all of the double values in this list in proper sequence
 float[] toArrayAsFloat()
          returns an array containing all of the float values in this list in proper sequence
 int[] toArrayAsInt()
          returns an array containing all of the int values in this list in proper sequence
 long[] toArrayAsLong()
          returns an array containing all of the long values in this list in proper sequence
 short[] toArrayAsShort()
          returns an array containing all of the short values in this list in proper sequence
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, iterator, listIterator, listIterator, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

properties

protected final XsdlElementProperties properties
Properties of the associated XML element


itemClass

protected final Class itemClass
Java class of the items contained in this list (is the same for all items)

Constructor Detail

BaseList

public BaseList(XsdlElementProperties properties)
Method Detail

getElementProperties

public XsdlElementProperties getElementProperties()
returns the properties of the XML element associated with the list


getItemType

public String getItemType()
returns the type of the record items in this list


checkType

protected Object checkType(Object o)
checks whether the given object is of the type permitted for elements of list. Returns the object if so, otherwise throws a runtime exception.


indexOf

public int indexOf(Object o)
returns the index in this list of the first occurrence of the specified element, of -1 if this list does not contain the element

Specified by:
indexOf in interface List
Overrides:
indexOf in class AbstractList

lastIndexOf

public int lastIndexOf(Object o)
returns the index in this list of the last occurrence of the specified element, of -1 if this list does not contain the element

Specified by:
lastIndexOf in interface List
Overrides:
lastIndexOf in class AbstractList

remove

public abstract Object remove(int index)
removes the element at the specified position in this list

Specified by:
remove in interface List
Overrides:
remove in class AbstractList

size

public abstract int size()
returns the current number of records in this list

Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

addAsBoolean

public void addAsBoolean(int index,
                         boolean v)
inserts the specified boolean value at the specified position in this list


addAsBoolean

public boolean addAsBoolean(boolean v)
appends the specified boolean value to the end of this list


containsAsBoolean

public boolean containsAsBoolean(boolean v)
returns true if this list contains the specified boolean value


getAsBoolean

public boolean getAsBoolean(int index)
returns the boolean value at the specified position in this list


indexOfAsBoolean

public int indexOfAsBoolean(boolean v)
returns the index in this list of the first occurrence of the specified boolean value, of -1 if this list does not contain the boolean value


lastIndexOfAsBoolean

public int lastIndexOfAsBoolean(boolean v)
returns the index in this list of the last occurrence of the specified boolean value, of -1 if this list does not contain the boolean value


removeAsBooleanAt

public boolean removeAsBooleanAt(int index)
removes the boolean value at the specified position in this list


removeAsBoolean

public boolean removeAsBoolean(boolean v)
removes the first occurrence in this list of the specified boolean value


setAsBoolean

public boolean setAsBoolean(int index,
                            boolean v)
replaces the boolean value at the specified position in this list with the specified boolean value


toArrayAsBoolean

public boolean[] toArrayAsBoolean()
returns an array containing all of the boolean values in this list in proper sequence


addAsByte

public void addAsByte(int index,
                      byte v)
inserts the specified byte value at the specified position in this list


addAsByte

public boolean addAsByte(byte v)
appends the specified byte value to the end of this list


containsAsByte

public boolean containsAsByte(byte v)
returns true if this list contains the specified byte value


getAsByte

public byte getAsByte(int index)
returns the byte value at the specified position in this list


indexOfAsByte

public int indexOfAsByte(byte v)
returns the index in this list of the first occurrence of the specified byte value, of -1 if this list does not contain the byte value


lastIndexOfAsByte

public int lastIndexOfAsByte(byte v)
returns the index in this list of the last occurrence of the specified byte value, of -1 if this list does not contain the byte value


removeAsByteAt

public byte removeAsByteAt(int index)
removes the byte value at the specified position in this list


removeAsByte

public boolean removeAsByte(byte v)
removes the first occurrence in this list of the specified byte value


setAsByte

public byte setAsByte(int index,
                      byte v)
replaces the byte value at the specified position in this list with the specified byte value


toArrayAsByte

public byte[] toArrayAsByte()
returns an array containing all of the byte values in this list in proper sequence


addAsInt

public void addAsInt(int index,
                     int v)
inserts the specified int value at the specified position in this list


addAsInt

public boolean addAsInt(int v)
appends the specified int value to the end of this list


containsAsInt

public boolean containsAsInt(int v)
returns true if this list contains the specified int value


getAsInt

public int getAsInt(int index)
returns the int value at the specified position in this list


indexOfAsInt

public int indexOfAsInt(int v)
returns the index in this list of the first occurrence of the specified int value, of -1 if this list does not contain the int value


lastIndexOfAsInt

public int lastIndexOfAsInt(int v)
returns the index in this list of the last occurrence of the specified int value, of -1 if this list does not contain the int value


removeAsIntAt

public int removeAsIntAt(int index)
removes the int value at the specified position in this list


removeAsInt

public boolean removeAsInt(int v)
removes the first occurrence in this list of the specified int value


setAsInt

public int setAsInt(int index,
                    int v)
replaces the int value at the specified position in this list with the specified int value


toArrayAsInt

public int[] toArrayAsInt()
returns an array containing all of the int values in this list in proper sequence


addAsLong

public void addAsLong(int index,
                      long v)
inserts the specified long value at the specified position in this list


addAsLong

public boolean addAsLong(long v)
appends the specified long value to the end of this list


containsAsLong

public boolean containsAsLong(long v)
returns true if this list contains the specified long value


getAsLong

public long getAsLong(int index)
returns the long value at the specified position in this list


indexOfAsLong

public int indexOfAsLong(long v)
returns the index in this list of the first occurrence of the specified long value, of -1 if this list does not contain the long value


lastIndexOfAsLong

public int lastIndexOfAsLong(long v)
returns the index in this list of the last occurrence of the specified long value, of -1 if this list does not contain the long value


removeAsLongAt

public long removeAsLongAt(int index)
removes the long value at the specified position in this list


removeAsLong

public boolean removeAsLong(long v)
removes the first occurrence in this list of the specified long value


setAsLong

public long setAsLong(int index,
                      long v)
replaces the long value at the specified position in this list with the specified long value


toArrayAsLong

public long[] toArrayAsLong()
returns an array containing all of the long values in this list in proper sequence


addAsShort

public void addAsShort(int index,
                       short v)
inserts the specified short value at the specified position in this list


addAsShort

public boolean addAsShort(short v)
appends the specified short value to the end of this list


containsAsShort

public boolean containsAsShort(short v)
returns true if this list contains the specified short value


getAsShort

public short getAsShort(int index)
returns the short value at the specified position in this list


indexOfAsShort

public int indexOfAsShort(short v)
returns the index in this list of the first occurrence of the specified short value, of -1 if this list does not contain the short value


lastIndexOfAsShort

public int lastIndexOfAsShort(short v)
returns the index in this list of the last occurrence of the specified short value, of -1 if this list does not contain the short value


removeAsShortAt

public short removeAsShortAt(int index)
removes the short value at the specified position in this list


removeAsShort

public boolean removeAsShort(short v)
removes the first occurrence in this list of the specified short value


setAsShort

public short setAsShort(int index,
                        short v)
replaces the short value at the specified position in this list with the specified short value


toArrayAsShort

public short[] toArrayAsShort()
returns an array containing all of the short values in this list in proper sequence


addAsDouble

public void addAsDouble(int index,
                        double v)
inserts the specified double value at the specified position in this list


addAsDouble

public boolean addAsDouble(double v)
appends the specified double value to the end of this list


containsAsDouble

public boolean containsAsDouble(double v)
returns true if this list contains the specified double value


getAsDouble

public double getAsDouble(int index)
returns the double value at the specified position in this list


indexOfAsDouble

public int indexOfAsDouble(double v)
returns the index in this list of the first occurrence of the specified double value, of -1 if this list does not contain the double value


lastIndexOfAsDouble

public int lastIndexOfAsDouble(double v)
returns the index in this list of the last occurrence of the specified double value, of -1 if this list does not contain the double value


removeAsDoubleAt

public double removeAsDoubleAt(int index)
removes the double value at the specified position in this list


removeAsDouble

public boolean removeAsDouble(double v)
removes the first occurrence in this list of the specified double value


setAsDouble

public double setAsDouble(int index,
                          double v)
replaces the double value at the specified position in this list with the specified double value


toArrayAsDouble

public double[] toArrayAsDouble()
returns an array containing all of the double values in this list in proper sequence


addAsFloat

public void addAsFloat(int index,
                       float v)
inserts the specified float value at the specified position in this list


addAsFloat

public boolean addAsFloat(float v)
appends the specified float value to the end of this list


containsAsFloat

public boolean containsAsFloat(float v)
returns true if this list contains the specified float value


getAsFloat

public float getAsFloat(int index)
returns the float value at the specified position in this list


indexOfAsFloat

public int indexOfAsFloat(float v)
returns the index in this list of the first occurrence of the specified float value, of -1 if this list does not contain the float value


lastIndexOfAsFloat

public int lastIndexOfAsFloat(float v)
returns the index in this list of the last occurrence of the specified float value, of -1 if this list does not contain the float value


removeAsFloatAt

public float removeAsFloatAt(int index)
removes the float value at the specified position in this list


removeAsFloat

public boolean removeAsFloat(float v)
removes the first occurrence in this list of the specified float value


setAsFloat

public float setAsFloat(int index,
                        float v)
replaces the float value at the specified position in this list with the specified float value


toArrayAsFloat

public float[] toArrayAsFloat()
returns an array containing all of the float values in this list in proper sequence

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] SAP_XIAF [sap.com] com.sap.aii.proxy.svc.facade api BC-XI


Copyright 2011 SAP AG Complete Copyright Notice