This project has retired. For details please refer to its Attic page.
Source code
001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.reef.tang.implementation.types;
020
021import org.apache.reef.tang.types.NamedParameterNode;
022import org.apache.reef.tang.types.Node;
023
024public class NamedParameterNodeImpl<T> extends AbstractNode implements
025    NamedParameterNode<T> {
026  private final String fullArgName;
027  private final String simpleArgName;
028  private final String documentation;
029  private final String shortName;
030  private final String[] defaultInstanceAsStrings;
031  private final boolean isSet;
032  private final boolean isList;
033
034  public NamedParameterNodeImpl(final Node parent, final String simpleName,
035                                final String fullName, final String fullArgName, final String simpleArgName,
036                                final boolean isSet, final boolean isList,
037                                final String documentation, final String shortName,
038                                final String[] defaultInstanceAsStrings) {
039    super(parent, simpleName, fullName);
040    this.fullArgName = fullArgName;
041    this.simpleArgName = simpleArgName;
042    this.isSet = isSet;
043    this.isList = isList;
044    this.documentation = documentation;
045    this.shortName = shortName;
046    this.defaultInstanceAsStrings = defaultInstanceAsStrings;
047  }
048
049  @Override
050  public String toString() {
051    return getSimpleArgName() + " " + getName();
052  }
053
054  @Override
055  public String getSimpleArgName() {
056    return simpleArgName;
057  }
058
059  @Override
060  public String getFullArgName() {
061    return fullArgName;
062  }
063
064  @Override
065  public String getDocumentation() {
066    return documentation;
067  }
068
069  @Override
070  public String getShortName() {
071    return shortName;
072  }
073
074  @Override
075  public String[] getDefaultInstanceAsStrings() {
076    return defaultInstanceAsStrings;
077  }
078
079  @Override
080  public boolean isSet() {
081    return isSet;
082  }
083
084  @Override
085  public boolean isList() {
086    return isList;
087  }
088}