//================================================================================================== // D i s p l a y Java // J a v a C o n s o l e // By Bruno Bachelet //================================================================================================== // Copyright (c) 1999-2016 // Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net // // This file is part of the B++ Library. This library is free software; you can redistribute it // and/or modify it under the terms of the GNU Library General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your option) any later // version. // // This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See // the GNU Library General Public License for more details (http://www.gnu.org).
/*DESCRIPTION*/ /* This module provides a console display for the Java components of the B++ Library. */
// Package //--------------------------------------------------------------------------------------- package bpp.display;
// Importation //----------------------------------------------------------------------------------- import java.io.*;
// J a v a C o n s o l e Class //------------------------------------------------------------------ /*CLASS JavaConsole */ /* Represents a console display. */ public class JavaConsole extends bpp.standard.OutputTextStream { //----------------------------------------------------------------------------------------WriteLine /*METHOD JavaConsole */ /* Terminates the line in the console. */ public void writeLine() { System.out.println(); } //-----------------------------------------------------------------------------------Write (String) /*METHOD JavaConsole */ /* Writes a string into the console. */ public void write(String agString) { System.out.print(agString); } //-------------------------------------------------------------------------------WriteLine (String) /*METHOD JavaConsole */ /* Writes a string and terminates the line in the console. */ public void writeLine(String agString) { System.out.println(agString); } //----------------------------------------------------------------------------------Write (Integer) /*METHOD JavaConsole */ /* Writes an integer into the console. */ public void write(int agInteger) { System.out.print(agInteger); } //------------------------------------------------------------------------------WriteLine (Integer) /*METHOD JavaConsole */ /* Writes an integer and terminates the line in the console. */ public void writeLine(int agInteger) { System.out.println(agInteger); } //-------------------------------------------------------------------------------------Write (Real) /*METHOD JavaConsole */ /* Writes a real number into the console. */ public void write(double agReal) { System.out.print(agReal); } //---------------------------------------------------------------------------------WriteLine (Real) /*METHOD JavaConsole */ /* Writes a real number and terminates the line in the console. */ public void writeLine(double agReal) { System.out.println(agReal); } }
// End //------------------------------------------------------------------------------------------- |
|