it.could.util.location
Class Location.Schemes

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byit.could.util.location.Location.Schemes
All Implemented Interfaces:
Collection, Encodable, EncodingAware, List
Enclosing class:
Location

public static class Location.Schemes
extends AbstractList
implements Encodable

The Schemes class represents an unmodifiable ordered collection of String schemes for a Location.

Author:
Pier Fumagalli

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface it.could.util.encoding.EncodingAware
DEFAULT_ENCODING, PLATFORM_ENCODING
 
Method Summary
 boolean equals(Object object)
          Check if the specified Object is equal to this Schemes instance.
 Object get(int index)
          Return the String scheme at the specified index.
 int hashCode()
          Return the hash code value for this Schemes instance.
 int size()
          Return the number of String schemes contained by this Schemes instance.
 String toString()
          Return the URL-encoded String representation of this Schemes instance.
 String toString(String encoding)
          Return the URL-encoded String representation of this Schemes instance using the specified character encoding.
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
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
 

Method Detail

get

public Object get(int index)

Return the String scheme at the specified index.

Specified by:
get in interface List

size

public int size()

Return the number of String schemes contained by this Schemes instance.

Specified by:
size in interface List

toString

public String toString()

Return the URL-encoded String representation of this Schemes instance.

Specified by:
toString in interface Encodable

toString

public String toString(String encoding)
                throws UnsupportedEncodingException

Return the URL-encoded String representation of this Schemes instance using the specified character encoding.

Specified by:
toString in interface Encodable
Throws:
UnsupportedEncodingException - if the specified encoding is not supported by the platform.

hashCode

public int hashCode()

Return the hash code value for this Schemes instance.

Specified by:
hashCode in interface List

equals

public boolean equals(Object object)

Check if the specified Object is equal to this Schemes instance.

The specified Object is considered equal to this one if it is non-null, it is a Schemes instance, and its string representation equals this one's.

Specified by:
equals in interface List