File: OptionValue.java

package info (click to toggle)
libsoptions-java 0.0~svn141-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 176 kB
  • sloc: java: 257; makefile: 62; sh: 16
file content (46 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//------------------------------------------------------------------------------
//$Author: saulius $
//$Date: 2018-03-01 08:14:33 -0500 (Thu, 01 Mar 2018) $
//$Revision: 96 $
//$URL: svn://saulius-grazulis.lt/libraries/trunk/java/SOptions/OptionValue.java $
//------------------------------------------------------------------------------

class OptionValue {
    boolean present;
    int count;

    boolean bool;
    char c;
    byte b;
    long i;
    double f;
    String s;

    // Empty default constructor does not need to do anything:
    OptionValue() {}
    
    OptionValue( boolean default_value ) {
        this.bool = default_value;
    }

    OptionValue( char default_value ) {
        this.c = default_value;
    }

    OptionValue( byte default_value ) {
        this.b = default_value;
    }

    OptionValue( long default_value ) {
        this.i = default_value;
    }

    OptionValue( double default_value ) {
        this.f = default_value;
    }

    OptionValue( String default_value ) {
        this.s = default_value;
    }

}