Code cleanup and formatting. Migrated to java 1.8.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / commandline / parameterparser / parameter / NullParameter.java
1 /*
2  * Svjatoslav Commons - shared library of common functionality.
3  * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 3 of the GNU Lesser General Public License
7  * or later as published by the Free Software Foundation.
8  */
9
10 package eu.svjatoslav.commons.commandline.parameterparser.parameter;
11
12 import eu.svjatoslav.commons.commandline.parameterparser.ArgumentCount;
13 import eu.svjatoslav.commons.commandline.parameterparser.Parameter;
14
15 public class NullParameter extends Parameter<NullParameter> {
16
17     public NullParameter(final String description) {
18         super(description, ArgumentCount.NONE);
19     }
20
21     @Override
22     public java.lang.String describeFormat() {
23         return "<none>";
24     }
25
26     @Override
27     public Boolean getValue() {
28         return isParameterSpecified();
29     }
30
31     @Override
32     public boolean validate(final java.lang.String value) {
33         return true;
34     }
35
36 }