Re: java.util.prefs.Preferences and arrays
Eric Sosman <esosman@ieee-dot-org.invalid> writes:
I've encountered two conventions, not specific to Java
but in other key=value "ini file" contexts:
- Composite value: "gods=Jupiter,Odin,Zeus"
The library ?ram.jar? contains an implementation of ?Unotal?
with support for mutiple values of a single key.
Here is an example from the Junotal tutorial:
Main.java
import java.lang.String;
import java.lang.System;
import de.dclj.ram.notation.unotal.Room;
import static de.dclj.ram.notation.unotal.RoomFromModule.room;
public final class Main
{ public static void main( final String argv[] )
{ System.out.println( room( "< a=b >" ).get( "a" ));
System.out.println( room( "< a=b >" ).get( "a" ).getClass() );
System.out.println( room( "< a=b a=c >" ).get( "a" ));
System.out.println( room( "< a=b a=c >" ).get( "a" ).getClass() );
System.out.println( room( "< >" ).getValues( "a" ));
System.out.println( room( "< >" ).getValues( "a" ).getClass() );
System.out.println( room( "< a=b >" ).getValues( "a" ));
System.out.println( room( "< a=b >" ).getValues( "a" ).getClass() );
System.out.println( room( "< a=b a=b >" ).getValues( "a" ));
System.out.println( room( "< a=b a=b >" ).getValues( "a" ).getClass() );
System.out.println( room( "< a=b a=c >" ).getValues( "a" ));
System.out.println( room( "< a=b a=c >" ).getValues( "a" ).getClass() ); }}
System.out
b
class de.dclj.ram.notation.unotal.StringValue
[b, c]
class de.dclj.ram.notation.unotal.SprayValue
[]
class de.dclj.ram.notation.unotal.SprayValue
[b]
class java.util.HashSet
[b]
class java.util.HashSet
[b, c]
class java.util.HashSet
The Junotal tutorial
http://www.purl.org/stefan_ram/pub/junotal_tutorial