Interface Identifier

All Known Subinterfaces:
FeatureId, GmlObjectId, ObjectId, RecordId, ResourceId
All Known Implementing Classes:
FeatureIdImpl, FeatureIdVersionedImpl, GmlObjectIdImpl, ResourceIdImpl

public interface Identifier
An object identifier.

This class is an abstract base for identifiers. Some known identifiers are:

  • FeatureId
  • GMLObjectId
  • RecordId
Author:
Jody Garnett (Refractions Research), Justin Deoliveira (The Open Planning Project)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Identifier is a data object, equals is based just on getID()
    Returns the identifier itself.
    int
    Identifier is a data object, hashCode is based just on getID()
    boolean
    matches(Object object)
    Determines if the id of an object matches the value of the identifier.
    Returns a string representation of the identifier.
  • Method Details

    • getID

      Object getID()
      Returns the identifier itself.
    • matches

      boolean matches(Object object)
      Determines if the id of an object matches the value of the identifier.
      Parameters:
      object - The object to perform the test against.
      Returns:
      true if a match, otherwise false.
    • equals

      boolean equals(Object obj)
      Identifier is a data object, equals is based just on getID()
      Overrides:
      equals in class Object
      Returns:
      true if obj is an Identifier with the same getID()
    • hashCode

      int hashCode()
      Identifier is a data object, hashCode is based just on getID()
      Overrides:
      hashCode in class Object
      Returns:
      hashCode based on getID()
    • toString

      String toString()
      Returns a string representation of the identifier.
      Overrides:
      toString in class Object
      Returns:
      getID().toString()