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
> >> > ;-)
> >> >
;-)
>> >
>> >
>> > 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:
>>
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.
>
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,
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
> >
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?
> > > >
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
> > >
> > >
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.
> > */
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
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:
>
>
> /**
>
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
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
12 matches
Mail list logo