Class PropertiesTypeLoader.TypeNameSet

  • Enclosing class:
    PropertiesTypeLoader

    static class PropertiesTypeLoader.TypeNameSet
    extends java.lang.Object
    Set of case insensitive type names with operation to quickly find which type names in the set are possible matches for a full type name. A match is a prefix which is either an exact match or matches up to the package separator (.). So, for example, given the full name one.two.three then one, one.two and one.two.three are all matches.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String[] _names  
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeNameSet​(java.util.Set<java.lang.String> names)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTo​(java.util.Collection<java.lang.String> names)  
      java.util.List<java.lang.String> findMatchesFor​(java.lang.String fullName)  
      private int getIndexOfLastPossibleMatch​(java.lang.String fullName)  
      private boolean isMatch​(java.lang.String prefix, java.lang.String fullName)  
      private boolean isPrefix​(java.lang.String possiblePrefix, java.lang.String fullName)  
      • Methods inherited from class java.lang.Object

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

      • _names

        private final java.lang.String[] _names
    • Constructor Detail

      • TypeNameSet

        public TypeNameSet​(java.util.Set<java.lang.String> names)
    • Method Detail

      • addTo

        public void addTo​(java.util.Collection<java.lang.String> names)
      • findMatchesFor

        public java.util.List<java.lang.String> findMatchesFor​(java.lang.String fullName)
      • getIndexOfLastPossibleMatch

        private int getIndexOfLastPossibleMatch​(java.lang.String fullName)
      • isPrefix

        private boolean isPrefix​(java.lang.String possiblePrefix,
                                 java.lang.String fullName)
      • isMatch

        private boolean isMatch​(java.lang.String prefix,
                                java.lang.String fullName)