Package org.graphstream.util

Examples of org.graphstream.util.Environment


  }
 
  protected void
  secondTest()
  {
    Environment env2 = new Environment();
   
    env2.setParameter( "param1", "val1" );
    env2.setParameter( "param2", "value2" );
    env2.setParameter( "param3", "value3" );
    env2.lockEnvironment( true );
    env2.setParameter( "param1", "value1" );
    env2.setParameter( "param4", "value4" );
   
    if( ! env2.getParameter( "param1" ).equals( "value1" ) ) System.err.printf( "test2: error 1%n" );
    if( ! env2.getParameter( "param2" ).equals( "value2" ) ) System.err.printf( "test2: error 2%n" );
    if( ! env2.getParameter( "param3" ).equals( "value3" ) ) System.err.printf( "test2: error 3%n" );
    if( ! env2.getParameter( "param4" ).equals( "" ) )       System.err.printf( "test2: error 4%n" );
   
    System.out.printf( "Test2: env = %s%n", env2.toString() );
   
    try
    {
      env2.writeParameterFile( "TOTO" );
    }
    catch( Exception e )
    {
      e.printStackTrace();
    }
View Full Code Here


  }
 
  protected void
  thirdTest()
  {
    Environment env3 = new Environment();
 
    try
    {
      env3.readParameterFile( "TOTO" );
   
      System.out.printf( "Test3: env = %s%n", env3.toString() );
    }
    catch( Exception e )
    {
      e.printStackTrace();
    }
View Full Code Here

  }
 
  protected void
  fourthTest()
  {
    Environment env4 = new Environment();
    TestContainer tc = new TestContainer();
   
    env4.setParameter( "param1", "value1" );
    env4.setParameter( "param2", "12345678" );
    env4.setParameter( "param3", "12345678" );
    env4.setParameter( "param4", "1234.5678" );
    env4.setParameter( "param5", "1234.5678" );
    env4.setParameter( "param6", "true" );
    env4.setParameter( "param7", "invalid!!" );
   
    env4.initializeFieldsOf( tc );
   
    System.out.printf( "Test4: env = %s%n", env4.toString() );
    System.out.printf( "Test4: tc  = %s%n", tc.toString() );
  }
View Full Code Here

TOP

Related Classes of org.graphstream.util.Environment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.