public static GraphEntity [ ] generateEntitiesOfType ( String type , Browser browser ) throws NotInitialised { Graph [ ] gs = browser . getGraphs ( ) ; Sequences p = new Sequences ( ) ; GraphEntity [ ] ges = browser . getAllEntities ( ) ; HashSet actors = new HashSet ( ) ; for ( int k = 0 ; k < ges . length ; k ++ ) { if ( ges [ k ] . getType ( ) . equals ( type ) ) { actors . add ( ges [ k ] ) ; } } return toGEArray ( actors . toArray ( ) ) ; }
It obtains all entities in the specification whose type represented as string is the same as the string passed as parameter