org.geotools.image.io.metadata
Class Identification

java.lang.Object
  extended by org.geotools.image.io.metadata.Identification
All Implemented Interfaces:
java.io.Serializable, java.lang.CharSequence

public class Identification
extends java.lang.Object
implements java.lang.CharSequence, java.io.Serializable

An immutable ("name", "type") pair.

Since:
2.4
Version:
$Id: Identification.java 30775 2008-06-20 15:50:30Z cedricbr $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Field Summary
 java.lang.String name
          The object name, or null if none.
 java.lang.String type
          The object type, or null if none.
 
Constructor Summary
Identification(MetadataAccessor accessor)
          Creates an identification from the "name" and "type" attributes in the specified accessor.
Identification(java.lang.String name, java.lang.String type)
          Creates an identification from the specified object name and type.
 
Method Summary
 char charAt(int index)
          Returns the name character at the specified index.
 boolean equals(java.lang.Object object)
          Compares the specified object with this identification for equality.
 int hashCode()
          Returns a hash value for this identification.
 int length()
          Returns the name length.
 java.lang.CharSequence subSequence(int start, int end)
          Returns a subsequence of this identification.
 java.lang.String toString()
          Returns the name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
The object name, or null if none.


type

public final java.lang.String type
The object type, or null if none.

Constructor Detail

Identification

public Identification(java.lang.String name,
                      java.lang.String type)
Creates an identification from the specified object name and type.


Identification

public Identification(MetadataAccessor accessor)
Creates an identification from the "name" and "type" attributes in the specified accessor.

Method Detail

length

public int length()
Returns the name length.

Specified by:
length in interface java.lang.CharSequence

charAt

public char charAt(int index)
Returns the name character at the specified index.

Specified by:
charAt in interface java.lang.CharSequence

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Returns a subsequence of this identification. The new identification will contains a substring of the name, but the type will be unchanged.

Specified by:
subSequence in interface java.lang.CharSequence

toString

public java.lang.String toString()
Returns the name.

Specified by:
toString in interface java.lang.CharSequence
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Returns a hash value for this identification.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Compares the specified object with this identification for equality.

Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.