public String json() { return Noson.reversal(data); }
/** * Serialize the poker list to transportable bytes * * @param pokers Poker list * @return Transportable byte array */ public static byte[] serialize(Object obj) { ByteLink bl = new ByteLink(); bl.append(PROTOCOL_HAED); bl.append(Noson.reversal(obj).getBytes()); bl.append(PROTOCOL_TAIL); return bl.toArray(); }
@Override public void call(ClientSide clientSide, String data) { List<Map<String, Object>> roomList = new ArrayList<>(ServerContains.getRoomMap().size()); for(Entry<Integer, Room> entry: ServerContains.getRoomMap().entrySet()) { Room room = entry.getValue(); roomList.add(MapHelper.newInstance() .put("roomId", room.getId()) .put("roomOwner", room.getRoomOwner()) .put("roomClientCount", room.getClientSideList().size()) .put("roomType", room.getType()) .map()); } ChannelUtils.pushToClient(clientSide.getChannel(), ClientEventCode.CODE_SHOW_ROOMS, Noson.reversal(roomList)); }
@Override public void call(ClientSide clientSide, String data) { Room room = new Room(ServerContains.getServerId()); room.setStatus(RoomStatus.BLANK); room.setType(RoomType.PVP); room.setRoomOwner(clientSide.getNickname()); room.getClientSideMap().put(clientSide.getId(), clientSide); room.getClientSideList().add(clientSide); room.setCurrentSellClient(clientSide.getId()); room.setCreateTime(System.currentTimeMillis()); room.setLastFlushTime(System.currentTimeMillis()); clientSide.setRoomId(room.getId()); ServerContains.addRoom(room); ChannelUtils.pushToClient(clientSide.getChannel(), ClientEventCode.CODE_ROOM_CREATE_SUCCESS, Noson.reversal(room)); }
pushToServer(channel, ServerEventCode.CODE_GAME_POKER_PLAY, Noson.reversal(options.toArray(new Character[] {}))); }else{ SimplePrinter.printNotice("Invalid enter");
cs[index] = pokerSell.getSellPokers().get(index).getLevel().getAlias()[0]; ServerEventListener.get(ServerEventCode.CODE_GAME_POKER_PLAY).call(robot, Noson.reversal(cs));
request.setBody(Noson.reversal(formParams));
/** * Parsing incoming text and metadata * * @param document * The parsed text is formatted as hypertext * @param data * Metadata * @return * The result of the analysis */ @SuppressWarnings("unchecked") public NoelResult el(String document, Object data) { AssertUtils.assertNotNull(data); AssertUtils.assertNotEmpty(data); final Object source = data instanceof Collection ? ConvertUtils.collectionToMap((Collection<?>) data) : Noson.convert(Noson.reversal(data), new NoType<Map<String, Object>>(){}); NoelWriter noelWriter = new NoelWriter(new SimpleScanner(document).scan().results()) .write(specialDocument -> { return Ourbatis .ASSIST_ADAPTERS .get(specialDocument.getName()) .adapter((Map<String, Object>) source, render, specialDocument); }, body -> { for(Entry<String, Object> entry: ((Map<String, Object>) source).entrySet()) { body = render.rending(source, body, entry.getKey()); } return body; }); return new NoelResult(noelWriter.body(), noelWriter.format()); }
ret = Noson.reversal(ret);
/** * Parsing incoming text and metadata * * @param document * The parsed text is formatted as hypertext * @param data * Metadata * @return * The result of the analysis */ @SuppressWarnings("unchecked") public NoelResult el(String document, Object data) { AssertUtils.assertNull(data); AssertUtils.assertBlank(data); final Object source = data instanceof Collection ? ConvertUtils.collectionToMap((Collection<?>) data) : Noson.convert(Noson.reversal(data), new NoType<Map<String, Object>>(){}); NoelWriter noelWriter = new NoelWriter(new SimpleScanner(document).scan().results()) .write(specialDocument -> { return Ourbatis .ASSIST_ADAPTERS .get(specialDocument.getName()) .adapter((Map<String, Object>) source, render, specialDocument); }, body -> { for(Entry<String, Object> entry: ((Map<String, Object>) source).entrySet()) { body = render.rending(source, body, entry.getKey()); } return body; }); return new NoelResult(noelWriter.body(), noelWriter.format()); }