Class StringKeyed

  • All Implemented Interfaces:
    java.lang.Comparable
    Direct Known Subclasses:
    StringObjectPair, StringPair

    public class StringKeyed
    extends java.lang.Object
    implements java.lang.Comparable
    Base class for a data representation using a string value as a key. This just holds the key and implements the Comparable interface.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String m_key
      Key string.
    • Constructor Summary

      Constructors 
      Constructor Description
      StringKeyed​(java.lang.String key)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object o)
      Compare to another instance.
      java.lang.String getKey()
      Get the key string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_key

        private final java.lang.String m_key
        Key string.
    • Constructor Detail

      • StringKeyed

        public StringKeyed​(java.lang.String key)
        Constructor.
        Parameters:
        key -
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Get the key string.
        Returns:
        key
      • compareTo

        public int compareTo​(java.lang.Object o)
        Compare to another instance.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        o - other instance
        Returns:
        difference