org.eclipse.emf.emfstore.internal.modelmutator.intern.attribute
Class AttributeSetter<E>

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.modelmutator.intern.attribute.AttributeSetter<E>
Type Parameters:
E - the attribute type of the attributes to create
Direct Known Subclasses:
AttributeSetterEBigDecimal, AttributeSetterEBigInteger, AttributeSetterEBoolean, AttributeSetterEByte, AttributeSetterEByteArray, AttributeSetterEChar, AttributeSetterEDate, AttributeSetterEDouble, AttributeSetterEEnum, AttributeSetterEFeatureMapEntry, AttributeSetterEFloat, AttributeSetterEInt, AttributeSetterELong, AttributeSetterEShort, AttributeSetterEString

public abstract class AttributeSetter<E>
extends Object

Abstract class that defines methods for creating attributes in order to generate or change Ecore models. Attributes are created using a Random object.


Constructor Summary
AttributeSetter(Random random)
          The construction of the AttributeSetter with Random object.
 
Method Summary
abstract  E createNewAttribute()
          Creates one attribute of type E.
abstract  Collection<E> createNewAttributes(int maxAmount)
          Creates a collection of attributes of type E.
 Random getRandom()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeSetter

public AttributeSetter(Random random)
The construction of the AttributeSetter with Random object.

Parameters:
random - the random object used for the setters
Method Detail

createNewAttribute

public abstract E createNewAttribute()
Creates one attribute of type E. The result is determined by random.

Returns:
the created attribute

createNewAttributes

public abstract Collection<E> createNewAttributes(int maxAmount)
Creates a collection of attributes of type E. The result is determined by random.

Parameters:
maxAmount - the maximum amount of attributes to create
Returns:
all created attributes as a collection

getRandom

public Random getRandom()
Returns:
the random


Copyright © 2015. All Rights Reserved.