001: /*
002: * This program is free software; you can redistribute it and/or modify
003: * it under the terms of the GNU General Public License as published by
004: * the Free Software Foundation; either version 2 of the License, or
005: * (at your option) any later version.
006: *
007: * This program is distributed in the hope that it will be useful,
008: * but WITHOUT ANY WARRANTY; without even the implied warranty of
009: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
010: * GNU General Public License for more details.
011: *
012: * You should have received a copy of the GNU General Public License
013: * along with this program; if not, write to the Free Software
014: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
015: */
016:
017: /*
018: * Option.java
019: * Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
020: *
021: */
022:
023: package weka.core;
024:
025: /**
026: * Class to store information about an option. <p>
027: *
028: * Typical usage: <p>
029: *
030: * <code>Option myOption = new Option("Uses extended mode.", "E", 0, "-E")); </code><p>
031: *
032: * @author Eibe Frank (eibe@cs.waikato.ac.nz)
033: * @version $Revision: 1.6 $
034: */
035: public class Option {
036:
037: /** What does this option do? */
038: private String m_Description;
039:
040: /** The synopsis. */
041: private String m_Synopsis;
042:
043: /** What's the option's name? */
044: private String m_Name;
045:
046: /** How many arguments does it take? */
047: private int m_NumArguments;
048:
049: /**
050: * Creates new option with the given parameters.
051: *
052: * @param description the option's description
053: * @param name the option's name
054: * @param numArguments the number of arguments
055: */
056: public Option(String description, String name, int numArguments,
057: String synopsis) {
058:
059: m_Description = description;
060: m_Name = name;
061: m_NumArguments = numArguments;
062: m_Synopsis = synopsis;
063: }
064:
065: /**
066: * Returns the option's description.
067: *
068: * @return the option's description
069: */
070: public String description() {
071:
072: return m_Description;
073: }
074:
075: /**
076: * Returns the option's name.
077: *
078: * @return the option's name
079: */
080: public String name() {
081:
082: return m_Name;
083: }
084:
085: /**
086: * Returns the option's number of arguments.
087: *
088: * @return the option's number of arguments
089: */
090: public int numArguments() {
091:
092: return m_NumArguments;
093: }
094:
095: /**
096: * Returns the option's synopsis.
097: *
098: * @return the option's synopsis
099: */
100: public String synopsis() {
101:
102: return m_Synopsis;
103: }
104: }
|