Package org.infinispan.schematic.document

Examples of org.infinispan.schematic.document.Symbol


        assertSame("\"abcdefghijklmnopqrstuvwxyz\"", writer.write("abcdefghijklmnopqrstuvwxyz"));
    }

    @Test
    public void shouldCorrectlyWriteSymbolValues() {
        assertSame("\"\"", writer.write(new Symbol("")));
        assertSame("\"10.01\"", writer.write(new Symbol("10.01")));
        assertSame("\"10.01d\"", writer.write(new Symbol("10.01d")));
        assertSame("\"null\"", writer.write(new Symbol("null")));
        assertSame("\"abcdefghijklmnopqrstuvwxyz\"", writer.write(new Symbol("abcdefghijklmnopqrstuvwxyz")));
    }
View Full Code Here


        if (value != null) {
            if (value instanceof Symbol) {
                return (Symbol)value;
            }
            if (value instanceof String) {
                return new Symbol((String)value);
            }
        }
        return null;
    }
View Full Code Here

        assertRoundtrip(input, false);
    }

    @Test
    public void shouldRoundTripSimpleBsonObjectWithSymbol() {
        input = new BasicDocument("foo", new Symbol("bar"));
        assertRoundtrip(input);
    }
View Full Code Here

    @Test
    public void shouldRoundTripSimpleBsonObjectWithArray() {
        BasicArray array = new BasicArray();
        array.addValue("value1");
        array.addValue(new Symbol("value2"));
        array.addValue(30);
        array.addValue(40L);
        array.addValue(4.33d);
        array.addValue(false);
        array.addValue(null);
View Full Code Here

        if (value instanceof MinKey) {
            value = "MinKey";
        } else if (value instanceof MaxKey) {
            value = "MaxKey";
        } else if (value instanceof Symbol) {
            Symbol symbol = (Symbol)value;
            value = new org.bson.types.Symbol(symbol.getSymbol());
        } else if (value instanceof ObjectId) {
            ObjectId id = (ObjectId)value;
            value = new org.bson.types.ObjectId(id.getBytes());
        } else if (value instanceof Timestamp) {
            Timestamp ts = (Timestamp)value;
View Full Code Here

      return new ObjectId(time, machine, process, inc);
   }

   @Override
   public Symbol createSymbol(String value) {
      return new Symbol(value);
   }
View Full Code Here

        if (value != null) {
            if (value instanceof Symbol) {
                return (Symbol)value;
            }
            if (value instanceof String) {
                return new Symbol((String)value);
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.infinispan.schematic.document.Symbol

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.