Dado un estado se devuelve una lista con los posibles estados que le
siguen en el protocolo.

@param source
@return
335842
public ArrayList<Transition> possibleNextStates(Automaton source) {
        ArrayList<Transition> r = possibleTransitions.get(source);
        if (r == null) {
            throw new UnsupportedOperationException(
                    "Not transitions registered from " + source.getName()
                    + ", automaton " + this.getName());
        }
        ArrayList<Transition> activatedTransitions = new ArrayList<Transition>();
        for (Transition t : r) {
            if (t.evaluate()) {
                activatedTransitions.add(t);
            }
        }
        ;
        return activatedTransitions;

    }
858078
public <T> Source<T> from(Supplier<T> supplier) {
		Assert.notNull(supplier, "Supplier must not be null");
		Source<T> source = getSource(supplier);
		if (this.sourceOperator != null) {
			source = this.sourceOperator.apply(source);
		}
		return source;
	}
921542
public Object execute(String source) {
        return newRunner().withContext(this.defaultExecutionContext).withSource(source).execute();
    }
548752
public static <S, D> List<D> mapList(Iterable<S> sourceList, Class<D> destinationClass) {
		List<D> destinationList = new ArrayList<D>();
		for (S source : sourceList) {
			if (source != null) {
				destinationList.add(mapper.map(source, destinationClass));
			}
		}
		return destinationList;
	}
523146
public static ImmutableSet<Symbol> loadSymbolSet(final CharSource source) throws IOException {
    return ImmutableSet.copyOf(loadSymbolList(source));
  }
1176431
public Object sqlToJava(Object source)
    {
        if(source == null)
            return null;
        try
        {
            return SerializationUtils.deserialize((byte[]) source);
        }
        catch(Throwable t)
        {
            throw new ConversionException(t);
        }
    }
64939
public static <T> HashSet<T> wrapHashSet(final T... source) {
        val list = new HashSet<T>();
        addToCollection(list, source);
        return list;
    }
111459
static ImmutableList<Source> listSources(OrganizationName organizationName) {
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
      // Start setting up a request to list sources in an organization.
      // OrganizationName organizationName = OrganizationName.of(/*organizationId=*/"123234324");
      ListSourcesRequest.Builder request =
          ListSourcesRequest.newBuilder().setParent(organizationName.toString());

      // Call the API.
      ListSourcesPagedResponse response = client.listSources(request.build());

      // This creates one list for all sources.  If your organization has a large number of sources
      // this can cause out of memory issues.  You can process them batches by returning
      // the Iterable returned response.iterateAll() directly.
      ImmutableList<Source> results = ImmutableList.copyOf(response.iterateAll());
      System.out.println("Sources:");
      System.out.println(results);
      return results;
    } catch (IOException e) {
      throw new RuntimeException("Couldn't create client.", e);
    }
  }
1075120
public Object javaToSql(Object source)
    {
        if (source == null)
            return null;
        try
        {
            ByteArrayOutputStream bao = new ByteArrayOutputStream();
            GZIPOutputStream gos = new GZIPOutputStream(bao);
            ObjectOutputStream oos = new ObjectOutputStream(gos);
            oos.writeObject(source);
            oos.close();
            gos.close();
            bao.close();
            byte[] result = bao.toByteArray();
            return result;
        }
        catch (Throwable t)
        {
            throw new ConversionException(t);
        }
    }
928978
public static ImmutableList<ErrorProneToken> getTokens(String source, Context context) {
    return new ErrorProneTokens(source, context).getTokens();
  }
1214155
static List<Field> getAccessibleFields(final Class<?> source) {
        return doPrivileged(new PrivilegedAction<List<Field>>() {
            public List<Field> run() {
                List<Field> foundFields = new ArrayList<Field>();
                for (Field field : source.getDeclaredFields()) {
                    // omit final fields
                    if (Modifier.isFinal(field.getModifiers())) {
                        continue;
                    }

                    if (!field.isAccessible()) {
                        field.setAccessible(true);
                    }
                    foundFields.add(field);
                }
                return foundFields;
            }
        });
    }
916044
public static Links parse(@Nullable String source) {

		if (!StringUtils.hasText(source)) {
			return NONE;
		}

		Matcher matcher = LINK_HEADER_PATTERN.matcher(source);
		List<Link> links = new ArrayList<>();

		while (matcher.find()) {

			Link link = Link.valueOf(matcher.group());

			if (link != null) {
				links.add(link);
			}
		}

		return new Links(links);
	}
774268
@Override
    public List<FileSource> createSources(String srcName) {
        final File dirOrFile = new File(srcName);

        final File[] files = dirOrFile.listFiles(FILTER);
        if (files != null) {
            final List<FileSource> sources = new ArrayList<FileSource>(files.length);
            for (File file : files) {
                sources.add(new FileSource(file));
            }
            return sources;
        } else {
            return Util.list(new FileSource(dirOrFile));
        }
    }
356873
public static <T> Set<T> wrapSet(final T source) {
        val list = new LinkedHashSet<T>();
        if (source != null) {
            list.add(source);
        }
        return list;
    }
235625
private Boolean[] convert(final List source) {

		final ArrayList<Boolean> result = new ArrayList<>();

		for (final Object o : source) {

			if (o instanceof Boolean) {

				result.add((Boolean)o);

			} else if (o != null) {

				result.add(Boolean.valueOf(o.toString()));

			} else {

				// dont know
				throw new IllegalStateException("Conversion of array type failed.");
			}
		}

		return (Boolean[])result.toArray(new Boolean[0]);
	}
1016819
public static ImmutableList<Symbol> loadSymbolList(final CharSource source) throws IOException {
    return SymbolUtils.listFrom(loadStringList(source));
  }
1291394
public void addSource(ISource source) {
		if (sourceList == null) {
			sourceList = new ArrayList<ISource>();
		}
		sourceList.add(source);
	}