Package java.util

Examples of java.util.Properties.clear()


      p.setProperty("location", "any");
      fclc.setProperties(p);
      assertTrue(fclc.isCheckCharacterPortability());
      assertEquals("any", fclc.getLocation());

      p.clear();

      p.setProperty("check.character.portability", "true");
      fclc.setProperties(p);
      assertTrue(fclc.isCheckCharacterPortability());
      assertNull(fclc.getLocation());
View Full Code Here


      p.setProperty("check.character.portability", "true");
      fclc.setProperties(p);
      assertTrue(fclc.isCheckCharacterPortability());
      assertNull(fclc.getLocation());

      p.clear();

      p.setProperty("check.character.portability", "false");
      fclc.setProperties(p);
      assertFalse(fclc.isCheckCharacterPortability());
      assertNull(fclc.getLocation());
View Full Code Here

     * @tests java.util.Properties#Properties()
     */
    public void test_Constructor() {
        Properties p = new Properties();
        // do something to avoid getting a variable unused warning
        p.clear();
        assertTrue("Created incorrect Properties", p.isEmpty());
    }

    public void test_loadLjava_io_InputStream_NPE() throws Exception {
        Properties p = new Properties();
View Full Code Here

    if ( property.isArray() ) {
      returnedClassOrElement = property.getElementClass();
      isArray = true;
    }
    Properties typeParameters = this.typeParameters;
    typeParameters.clear();
    String type = BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( (!key && property.isAnnotationPresent( Temporal.class ) )
        || (key && property.isAnnotationPresent( MapKeyTemporal.class ) )) {

      boolean isDate;
View Full Code Here

    digests = new HashMap<String,Object>();
    digests.put(result.get(WaybackConstants.RESULT_MD5_DIGEST),null);
    numCaptures = 1;

    Properties p = result.getData();
    p.clear();
    resultRef = result;
    resultRef.put(RESULT_ORIGINAL_URL,originalUrl);
    resultRef.put(RESULT_URL,currentUrl);
    resultRef.put(RESULT_FIRST_CAPTURE,firstCapture);
    resultRef.put(RESULT_LAST_CAPTURE,lastCapture);
View Full Code Here

                String line;
                BufferedReader in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(out.toByteArray()),"UTF-8"));
                while ((line=in.readLine())!=null) {
                    if (line.length()==0) {
                        r.add(new iOSDevice(p));
                        p.clear();
                        continue;
                    }
                    int idx = line.indexOf('=');
                    if (idx<0) {
                        logger.println("Invalid output line:"+line);
View Full Code Here

    if ( property.isArray() ) {
      returnedClassOrElement = property.getElementClass();
      isArray = true;
    }
    Properties typeParameters = this.typeParameters;
    typeParameters.clear();
    String type = BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( (!key && property.isAnnotationPresent( Temporal.class ) )
        || (key && property.isAnnotationPresent( MapKeyTemporal.class ) )) {

      boolean isDate;
View Full Code Here

        Properties props=new Properties();
        props.setProperty("timeout", "500,1000,2000,3000");
        unicast.setProperties(props);

        DISCARD discard=new DISCARD();
        props.clear();
        props.setProperty("down", "0.1"); // discard all down message with 10% probability
        discard.setProperties(props);

        Protocol[] stack=new Protocol[]{unicast,discard};
        createStack(stack);
View Full Code Here

    if ( property.isArray() ) {
      returnedClassOrElement = property.getElementClass();
      isArray = true;
    }
    Properties typeParameters = this.typeParameters;
    typeParameters.clear();
    String type = BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( ( !key && property.isAnnotationPresent( Temporal.class ) )
        || ( key && property.isAnnotationPresent( MapKeyTemporal.class ) ) ) {

      boolean isDate;
View Full Code Here

        Util.p("===");
        for(Entry e : props.entrySet()) {
            Util.p("key = " + e.getKey() + " " + e.getValue() );
        }
        props.storeToXML(new FileOutputStream("foo.xml"), "foo");
        props.clear();
        props = new Properties();
        Util.p("===");
        for(Entry e : props.entrySet()) {
            Util.p("key = " + e.getKey() + " " + e.getValue() );
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.