NightOwl888 opened a new issue, #1069:
URL: https://github.com/apache/lucenenet/issues/1069

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Task description
   
   `SetOnce<T>` has `Get()` and `Set()` methods without any overloads. This 
class can be improved by changing `Get()` and `Set()` methods to a `Value` 
property to match `Nullable<T>` in .NET.
   
   `Get()` and `Set()` should be deprecated and moved to the 
`Support/ObsoleteAPI` (for removal in the rc1). This can be done by making 
`SetOnce<T>` into a partial class, which allows us to simply delete the whole 
class to remove the obsolete members.
   
   > NOTE: In Java, there was no restriction on which types could be used in 
`SetOnce<T>`, but all custom types in Java are reference types. Adapting this 
class to support value types doesn't seem worth the trouble. Users that need to 
have this functionality with numeric types can either use reference types from 
`J2N.Numerics` or make their own `SetOnceInt32` type.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to