Examples of Notation


Examples of com.toc.dton.Notation

      testList.add("Test 1");
      testList.add("Test 3");
      testList.add(null);
      testList.add("Test 2");
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

      testList.add("Test String");
      testList.add(1);
      testList.add(null);
      testList.add(new TestBean());
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testBlankListEncode() {
    ArrayList<String> testList = new ArrayList<String>();
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testNullListEncode() {
    ArrayList<String> testList = null;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testList);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testList, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Null List");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Null List");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testIntegerEncode() {
    Integer testInteger = 1234;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testInteger);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testInteger, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Integer");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Integer");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testIntEncode() {
    int testInt = 1234;
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testInt);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testInt, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode int");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode int");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testStringEncode() {
    String testString = "  Test {}[]!@#$%^&*()-=\\_+|~`;':\",./<>? \n 1234 ";
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testString);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testString, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode String");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode String");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of com.toc.dton.Notation

  public void testBlankStringEncode() {
    String testString = "";
    String parseResult;
    try {
      //ParserObject obj = new ParserObject(testString);
      Notation notation = NotationHelper.createXMLNotation();
      OutputStream resultStream = new ByteArrayOutputStream();
      notation.encode(testString, resultStream);
      parseResult = resultStream.toString();
      System.out.println("------------------");
      System.out.println("Test Encode Blank String");
      System.out.println("------------------");
      System.out.println(parseResult);
      Object analysisResult = notation.decode(XMLHelper.parseStream(parseResult));
      System.out.println("------------------");
      System.out.println("Test Decode Blank String");
      System.out.println("------------------");
      System.out.println(analysisResult);
     
View Full Code Here

Examples of jscicalc.Notation

    m = calc.matcher( line );
    if( !m.find() ){
        String expressionString = line;
        Object o = parse( expressionString, b );
        if( o instanceof Complex ){
      Notation n = new Notation();
      n.setRectangular();
      n.setComplex();
      n.setStandard();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setScientific();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setNonComplex();
      n.setStandard();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setScientific();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setPolar();
      n.setComplex();
      n.setStandard();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setScientific();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setNonComplex();
      n.setStandard();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
      n.setScientific();
      ++tests;
      if( checkNumber( expressionString, (Complex)o, n, b ) )
          ++successes;
        } else {
      System.out.print( "Failed on: " );
View Full Code Here

Examples of jscicalc.Notation

     * @param base The base
     */
    public DoubleFormat( double number, Base base ){
  this.number = number;
  this.base = base;
  this.notation = new Notation();
  setPrecision( maxPrecision() );
    }
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.