I need to change the position of text written on top of aggregation relation in pgf-umlcd
. Here is what I've written so far:
\begin{figure}[h]
\centering
\begin{tikzpicture}[show background grid]
\begin{class}[text width=10cm]{StateSpace}{7,0}
\attribute{- stateToActionSet: HashMap<State, HashMap<Action, Double>{}>}
\operation{+ addState(s: State)}
\operation{+ size()}
\operation{+ updateQValueForAction(s: State, a: Action, qValue: Double)}
\end{class}
\begin{class}{State}{12,-5}
\attribute{+ latency: Integer}
\attribute{+ isLoadIncreasing: Boolean}
\end{class}
\begin{interface}{Action}{4,-5}
\operation[0]{+ toString()}
\end{interface}
\begin{class}[text width=3cm]{NoAction}{0,-8}
\implement{Action}
\operation{+ toString()}
\end{class}
\begin{class}[text width=3cm]{ScaleIn}{4,-8}
\implement{Action}
\operation{+ toString()}
\end{class}
\begin{class}[text width=3cm]{ScaleOut}{8,-8}
\implement{Action}
\operation{+ toString()}
\end{class}
\aggregation{StateSpace}{states}{1..*}{State}
\aggregation{StateSpace}{actionSet}{1..*}{Action}
\end{tikzpicture}
\caption{State Space Class Diagram}
\end{figure}
As you see, the text has been positioned on top of aggregation line. Is there any way to change it?