Doug Cutting wrote:

It would be best to get the compiler to check the order.

If we change this, why not use type-safe enumerations:

The calls would look like:

new Field("name", "value", Stored.YES, Indexed.NO, Tokenized.YES);

Stored could be implemented as the nested class:

public final class Stored {
private Stored() {}
public static final Stored YES = new Stored();
public static final Stored NO = new Stored();

+1... I'm not in love with this pattern but since Java < 1.4 doesnt' support enum its better than nothing.

I also didn't want to submit a recommendation that would break APIs. I assume the old API would be deprecated?



Please reply using PGP. NewsMonster -
Kevin A. Burton, Location - San Francisco, CA, Cell - 415.595.9965
AIM/YIM - sfburtonator, Web -
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
IRC - #infoanarchy | #p2p-hackers | #newsmonster

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to