public ConfigOption < T > withFallbackKeys ( String ... fallbackKeys ) { final Stream < FallbackKey > newFallbackKeys = Arrays . stream ( fallbackKeys ) . map ( FallbackKey :: createFallbackKey ) ; final Stream < FallbackKey > currentAlternativeKeys = Arrays . stream ( this . fallbackKeys ) ; // put fallback keys first so that they are prioritized final FallbackKey [ ] mergedAlternativeKeys = Stream . concat ( newFallbackKeys , currentAlternativeKeys ) . toArray ( FallbackKey [ ] :: new ) ; return new ConfigOption <> ( key , description , defaultValue , mergedAlternativeKeys ) ; }
Creates a new config option using this option s key and default value and adding the given fallback keys .