ilog.server.jcomp
Class MvArray
java.lang.Object
|
+--ilog.server.jcomp.MvUserType
|
+--ilog.server.jcomp.MvArray
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.lang.Iterable, java.util.List, ilog.server.jcomp.Streamable
- public class MvArray
- extends MvUserType
- implements java.util.List, java.lang.Cloneable
Implements an array of Java Objects that can be transported
between processes.
|
Field Summary |
protected java.util.Vector |
_array
|
|
Constructor Summary |
MvArray()
Default constructor. |
MvArray(java.util.Collection coll)
Creates an instance of MvArray with the specified instance of
Collection. |
MvArray(int initialSize)
Creates an instance of MvArray with the specified size. |
|
Method Summary |
boolean |
add(boolean value)
|
boolean |
add(char value)
|
boolean |
add(double value)
|
boolean |
add(float value)
|
boolean |
add(int value)
|
void |
add(int index,
java.lang.Object value)
|
boolean |
add(long value)
|
boolean |
add(java.lang.Object value)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
clear()
|
java.lang.Object |
clone()
Cloning an array will copy its internal data. |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
static MvArray |
Decode(MvMessage msg)
|
static MvArray |
DeepClone(java.util.Collection coll)
|
MvMessage |
encode(MvMessage msg)
Writes an instance into an MvMessage for transfer to another
process. |
boolean |
equals(java.lang.Object obj)
Checks whether two arrays are equal. |
java.lang.Object |
get(int index)
|
java.util.Vector |
getVector()
|
int |
hashCode()
Returns the hash code value for this map. |
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
int |
size()
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
Provides a string representation of the object for debugging purposes. |
| Methods inherited from class ilog.server.jcomp.MvUserType |
asAny, asBoolean, asChar, asDouble, asFloat, asHRef, asLong, asObjectRef, asRef, asString, asValue, duplicate, stream |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, add, copyOf, of, of, of, of, of, of, of, of, of, of, of, of, replaceAll, set, sort, spliterator, toArray |
| Methods inherited from interface java.util.Collection |
parallelStream, removeIf, stream, toArray |
| Methods inherited from interface java.lang.Iterable |
forEach |
_array
protected java.util.Vector _array
MvArray
public MvArray()
- Default constructor.
MvArray
public MvArray(int initialSize)
- Creates an instance of MvArray with the specified size.
- Parameters:
initialSize - The initial size of the array.
MvArray
public MvArray(java.util.Collection coll)
- Creates an instance of MvArray with the specified instance of
Collection.
- Parameters:
coll - The collection.
DeepClone
public static MvArray DeepClone(java.util.Collection coll)
Decode
public static MvArray Decode(MvMessage msg)
encode
public MvMessage encode(MvMessage msg)
- Writes an instance into an MvMessage for transfer to another
process. See the
encode method in
MvUserType for more details.
- Overrides:
encode in class MvUserType
- Parameters:
msg - The message to encode.
add
public boolean add(java.lang.Object value)
addAll
public boolean addAll(java.util.Collection c)
- Specified by:
addAll in interface java.util.List
clear
public void clear()
- Specified by:
clear in interface java.util.List
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains in interface java.util.List
containsAll
public boolean containsAll(java.util.Collection c)
- Specified by:
containsAll in interface java.util.List
equals
public boolean equals(java.lang.Object obj)
- Checks whether two arrays are equal. Returns true if:
- The object passed as a parameter is an instance of
MvArray.
- The arrays are equal as defined by the
List
interface, that is:
- Both lists have the same size.
- All corresponding pairs of elements in the two lists are equal. (Two
elements e1 and e2 are equal if
(e1==null ? e2==null : e1.equals(e2)).)
In other words, two arrays are defined to be equal if they contain the
same elements in the same order.
- Specified by:
equals in interface java.util.List- Overrides:
equals in class MvUserType
- Parameters:
obj - The object to compare to.
hashCode
public int hashCode()
- Returns the hash code value for this map.
The hash code of a map is defined to be the sum of the hash codes of each
entry in the map's entrySet view. This ensures that
t1.equals(t2) implies that
t1.hashCode()==t2.hashCode() for any two maps t1
and t2, as required by the general contract of
Object.hashCode.
- Specified by:
hashCode in interface java.util.List- Overrides:
hashCode in class java.lang.Object
- Returns:
- The hash code value for this map.
- See Also:
Map.Entry#hashCode(),
Object.hashCode(),
Object.equals(Object),
equals(Object)
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.List
iterator
public java.util.Iterator iterator()
- Specified by:
iterator in interface java.util.List
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove in interface java.util.List
removeAll
public boolean removeAll(java.util.Collection c)
- Specified by:
removeAll in interface java.util.List
retainAll
public boolean retainAll(java.util.Collection c)
- Specified by:
retainAll in interface java.util.List
size
public int size()
- Specified by:
size in interface java.util.List
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray in interface java.util.List
toArray
public java.lang.Object[] toArray(java.lang.Object[] a)
add
public void add(int index,
java.lang.Object value)
addAll
public boolean addAll(int index,
java.util.Collection c)
- Specified by:
addAll in interface java.util.List
get
public java.lang.Object get(int index)
- Specified by:
get in interface java.util.List
indexOf
public int indexOf(java.lang.Object o)
- Specified by:
indexOf in interface java.util.List
lastIndexOf
public int lastIndexOf(java.lang.Object o)
- Specified by:
lastIndexOf in interface java.util.List
listIterator
public java.util.ListIterator listIterator()
- Specified by:
listIterator in interface java.util.List
listIterator
public java.util.ListIterator listIterator(int index)
- Specified by:
listIterator in interface java.util.List
remove
public java.lang.Object remove(int index)
- Specified by:
remove in interface java.util.List
set
public java.lang.Object set(int index,
java.lang.Object element)
subList
public java.util.List subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface java.util.List
clone
public java.lang.Object clone()
- Cloning an array will copy its internal data.
- Overrides:
clone in class MvUserType
add
public boolean add(int value)
add
public boolean add(long value)
add
public boolean add(double value)
add
public boolean add(float value)
add
public boolean add(char value)
add
public boolean add(boolean value)
toString
public java.lang.String toString()
- Provides a string representation of the object for debugging purposes.
- Overrides:
toString in class java.lang.Object
getVector
public java.util.Vector getVector()