org.nuiton.eugene.models.object.ObjectModelUMLModifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eugene Show documentation
Show all versions of eugene Show documentation
Efficient Universal Generator.
/*
* #%L
* EUGene :: EUGene
* $Id: ObjectModelUMLModifier.java 1154 2012-06-01 11:09:24Z athimel $
* $HeadURL: http://svn.nuiton.org/svn/eugene/tags/eugene-2.6.1/eugene/src/main/java/org/nuiton/eugene/models/object/ObjectModelUMLModifier.java $
* %%
* Copyright (C) 2004 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
package org.nuiton.eugene.models.object;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
/**
* Enum that represents UML modifiers.
*
* @author Arnaud Thimel
* @since 2.4.3
*/
public enum ObjectModelUMLModifier implements ObjectModelModifier {
AGGREGATE,
COMPOSITE,
UNIQUE,
ORDERED,
NAVIGABLE;
public static final Set associationTypes =
ImmutableSet.of(AGGREGATE, COMPOSITE);
@Override
public boolean isVisibility() {
return false;
}
@Override
public boolean isAssociationType() {
return associationTypes.contains(this);
}
@Override
public String getName() {
return name();
}
@Override
public String toString() {
String result = name().toLowerCase();
return result;
}
}