package jetbrains.mps.lang.editor.structure; /*Generated by MPS */ import java.util.List; import jetbrains.mps.internal.collections.runtime.ListSequence; import java.util.LinkedList; public enum StyleAttributeKind { inherited("inherited", true), simple("simple", false); private final String myName; public String getName() { return myName; } private final boolean myValue; StyleAttributeKind(String name, boolean value) { myName = name; myValue = value; } public boolean getValue() { return myValue; } public String getValueAsString() { return Boolean.toString(myValue); } public static List<StyleAttributeKind> getConstants() { List<StyleAttributeKind> list = ListSequence.fromList(new LinkedList<StyleAttributeKind>()); ListSequence.fromList(list).addElement(StyleAttributeKind.inherited); ListSequence.fromList(list).addElement(StyleAttributeKind.simple); return list; } public static StyleAttributeKind getDefault() { return StyleAttributeKind.inherited; } public static StyleAttributeKind parseValue(String value) { if (value == null) { return StyleAttributeKind.getDefault(); } if (value.equals(StyleAttributeKind.inherited.getValueAsString())) { return StyleAttributeKind.inherited; } if (value.equals(StyleAttributeKind.simple.getValueAsString())) { return StyleAttributeKind.simple; } return StyleAttributeKind.getDefault(); } }