Class MetadataBuilder.Sentence

java.lang.Object
org.apache.sis.util.AbstractInternationalString
org.apache.sis.internal.storage.MetadataBuilder.Sentence
All Implemented Interfaces:
CharSequence, Comparable<org.opengis.util.InternationalString>, Formattable, org.opengis.util.InternationalString
Enclosing class:
MetadataBuilder

private static final class MetadataBuilder.Sentence extends AbstractInternationalString
An international string where localized identifiers are formatted more like an English sentence. This is used for wrapping GenericName.toInternationalString() representation for use as a citation title.
  • Field Details

    • name

      private final org.opengis.util.InternationalString name
      The generic name localized representation.
  • Constructor Details

    • Sentence

      Sentence(org.opengis.util.GenericName name)
      Returns a new wrapper for the given generic name.
  • Method Details

    • toString

      public String toString(Locale locale)
      Returns the generic name as an English-like sentence.
      Specified by:
      toString in interface org.opengis.util.InternationalString
      Specified by:
      toString in class AbstractInternationalString
      Parameters:
      locale - the desired locale for the string to be returned.
      Returns:
      the string in the given locale if available, or in an implementation-dependent fallback locale otherwise.
      See Also:
    • hashCode

      public int hashCode()
      Returns a hash code value for this sentence.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Compares the given object with this sentence for equality.
      Overrides:
      equals in class Object