alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (Version.java)

This example Scala source code file (Version.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

build, build, major, minor, minor, revision, revision, string, version, version

The Scala Version.java source code

/*
 * System.Reflection-like API for access to .NET assemblies (DLL & EXE)
 */


package ch.epfl.lamp.compiler.msil;


/**
 * Represents the version number for a common language runtime assembly
 *
 * @author Nikolay Mihaylov
 * @version 1.0
 */
public final class Version {

    //##########################################################################
    // public interface

    /**
     * Gets the value of the major component of the version
     * number for this instance.
     */
    public final int  Major;

    /**
     * Gets the value of the minor component of the version
     * number for this instance.
     */
    public final int Minor;

    /**
     * Gets the value of the build component of the version
     * number for this instance.
     */
    public final int Build;

    /**
     * Gets the value of the revision component of the version
     * number for this instance.
     */
    public final int Revision;

    /**
     * Initializes a new instance of the Version class.
     */
    public Version() {
	this(0,0,0,0);
    }

    /**
     * Initializes a new instance of the Version class with
     * the specified major, minor, build, and revision numbers.
     */
    public Version(int major, int minor, int build, int revision) {
	this.Major = major;
	this.Minor = minor;
	this.Build = build;
	this.Revision = revision;
    }

    /**
     * Converts the value of this instance to its equivalent String representation
     */
    public String toString() {
	return "" + Major + "." + Minor + "." + Build + "." +  Revision;
    }

    //##########################################################################

} // class Version

Other Scala examples (source code examples)

Here is a short list of links related to this Scala Version.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.