Re: Pair of nulls

2017-05-14 Thread Gary Gregory
mmutablePair.ofNull() > >> > > > >> > > >> > I like it but at the same time it feels to me like I am getting a NEW > >> > object like ImmutablePair.of(x, y) give me a new object. Might just be > >> me > >> > ;-) > >> >

Re: Pair of nulls

2017-05-11 Thread Matt Benson
;-) >> > >> > >> > You provide the methods so that people can get an instance parameterized >> > for their compilation needs. In reality you can return the same empty, >> > immutable instance. >> > >> >> Yes, of course: >>

Re: Pair of nulls

2017-05-11 Thread Matt Sicker
EW > > object like ImmutablePair.of(x, y) give me a new object. Might just be me > > ;-) > > > > > > You provide the methods so that people can get an instance parameterized > > for their compilation needs. In reality you can return the same empty, > > immutable instance. >

Re: Pair of nulls

2017-05-11 Thread Gary Gregory
rn the same empty, > immutable instance. > Yes, of course: /** * An immutable pair of nulls. */ // This is not defined with generics to avoid warnings in call sites. @SuppressWarnings("rawtypes") private static final ImmutablePair NULL = ImmutablePair.of(null,

Re: Pair of nulls

2017-05-11 Thread Matt Benson
t; > > > checking when comparing against a null tuple. This would be > marginally > > > > faster. > > > > > > > > Any preference of being explicit (redundant) here? > > > > ImmutablePair.NULL_PAIR and ImmutableTriple.NULL_TRIPLE > >

Re: Pair of nulls

2017-05-10 Thread Gary Gregory
lassable), then identity checking could be used in place of > > equality > > > > checking when comparing against a null tuple. This would be > marginally > > > > faster. > > > > > > > > Any preference of being explicit (redundant) here? > > > >

Re: Pair of nulls

2017-05-10 Thread Matt Sicker
lity > > > checking when comparing against a null tuple. This would be marginally > > > faster. > > > > > > Any preference of being explicit (redundant) here? > > > ImmutablePair.NULL_PAIR and ImmutableTriple.NULL_TRIPLE > > > > > >

Re: Pair of nulls

2017-05-10 Thread Gary Gregory
TRIPLE > > > > On May 10, 2017 7:35 PM, "Gary Gregory" wrote: > > > > Hi All, > > > > Any thoughts for or against adding the following to ImmutablePair: > > > > > > /** > > * An immutable pair of nulls. > > */

Re: Pair of nulls

2017-05-10 Thread Matt Benson
against a null tuple. This would be marginally > faster. > > Any preference of being explicit (redundant) here? > ImmutablePair.NULL_PAIR and ImmutableTriple.NULL_TRIPLE > > On May 10, 2017 7:35 PM, "Gary Gregory" wrote: > > Hi All, > > Any thoughts for or aga

Re: Pair of nulls

2017-05-10 Thread Matt Sicker
preference of being explicit (redundant) here? > ImmutablePair.NULL_PAIR and ImmutableTriple.NULL_TRIPLE > > On May 10, 2017 7:35 PM, "Gary Gregory" wrote: > > Hi All, > > Any thoughts for or against adding the following to ImmutablePair: > > > /** >

Re: Pair of nulls

2017-05-10 Thread Javen O'Neal
adding the following to ImmutablePair: /** * An immutable pair of nulls. */ // This is not defined with generics to avoid warnings in call sites. @SuppressWarnings("rawtypes") public static final ImmutablePair NULL = ImmutablePair.of(null, null); Same for Immuta

Pair of nulls

2017-05-10 Thread Gary Gregory
Hi All, Any thoughts for or against adding the following to ImmutablePair: /** * An immutable pair of nulls. */ // This is not defined with generics to avoid warnings in call sites. @SuppressWarnings("rawtypes") public static final ImmutablePair NULL = Immuta