public class StringList extends ComplexProperty implements Iterable<String>
| Constructor and Description |
|---|
StringList()
Initializes a new instance of the "StringList" class.
|
StringList(Iterable<String> strings)
Initializes a new instance of the
|
StringList(String itemXmlElementName)
Initializes a new instance of the "StringList" class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String s)
Adds a string to the list.
|
void |
addRange(Iterable<String> strings)
Adds multiple strings to the list.
|
void |
clearList()
Clears the list.
|
boolean |
contains(String s)
Determines whether the list contains a specific string.
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
Iterator<String> |
getIterator()
Gets an iterator that iterates through the elements of the collection.
|
int |
getSize()
Gets the number of strings in the list.
|
String |
getString(int index)
Gets the string at the specified index.
|
int |
hashCode()
Serves as a hash function for a particular type.
|
Iterator<String> |
iterator()
Returns an iterator over a set of elements of type T.
|
boolean |
remove(String s)
Removes a string from the list.
|
void |
removeAt(int index)
Removes the string at the specified position from the list.
|
void |
setString(int index,
Object object)
Sets the string at the specified index.
|
String |
toString()
Returns a string representation of the object.
|
boolean |
tryReadElementFromXml(EwsServiceXmlReader reader)
Tries to read element from XML.
|
void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes elements to XML.
|
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, clearChangeLog, func, getNamespace, internalValidate, loadFromXml, loadFromXml, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXmlToPatch, updateFromXml, updateFromXml, validate, writeAttributesToXml, writeToXml, writeToXmlclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic StringList()
public StringList(Iterable<String> strings)
strings - The strings.public StringList(String itemXmlElementName)
itemXmlElementName - Name of the item XML element.public boolean tryReadElementFromXml(EwsServiceXmlReader reader) throws XMLStreamException, ServiceXmlDeserializationException
tryReadElementFromXml in class ComplexPropertyreader - accepts EwsServiceXmlReaderXMLStreamException - the XML stream exceptionServiceXmlDeserializationException - the service xml deserialization exceptionpublic void writeElementsToXml(EwsServiceXmlWriter writer) throws ServiceXmlSerializationException, XMLStreamException
writeElementsToXml in class ComplexPropertywriter - accepts EwsServiceXmlWriterServiceXmlSerializationException - the service xml serialization exceptionXMLStreamException - the XML stream exceptionpublic void addRange(Iterable<String> strings)
strings - The strings to add.public boolean contains(String s)
s - The string to check the presence of.public boolean remove(String s)
s - The string to remove.public void removeAt(int index)
index - The index of the string to remove.public void clearList()
public String toString()
toString method returns a string that "textually represents"
this object. The result should be a concise but informative
representation that is easy for a person to read. It is recommended that
all subclasses override this method.
The toString method for class Object returns a
string consisting of the name of the class of which the object is an
instance, the at-sign character `@', and the unsigned
hexadecimal representation of the hash code of the object. In other
words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
public int getSize()
public String getString(int index)
index - The index of the string to get or set.public void setString(int index, Object object)
index - The indexobject - The object.public Iterator<String> getIterator()
public boolean equals(Object obj)
equals method implements an equivalence relation on
non-null object references:
x, x.equals(x) should return true.
x and y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x, y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true or
consistently return false, provided no information used in
equals comparisons on the objects is modified.
x,
x.equals(null) should return false.
Object implements the
most discriminating possible equivalence relation on objects; that is,
for any non-null reference values x and y, this
method returns true if and only if x and
y refer to the same object (x == y has the
value true).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the general
contract for the hashCode method, which states that equal
objects must have equal hash codes.equals in class Objectobj - the reference object with which to compare.hashCode(),
Hashtablepublic int hashCode()
Copyright © 2012–2015 Microsoft. All rights reserved.