Package com.google.common.base

Examples of com.google.common.base.Predicate


    return (paramMultimap instanceof FilteredMultimap) ? filterFiltered((FilteredMultimap)paramMultimap, paramPredicate) : new FilteredMultimap((Multimap)Preconditions.checkNotNull(paramMultimap), paramPredicate);
  }

  private static Multimap filterFiltered(FilteredMultimap paramFilteredMultimap, Predicate paramPredicate)
  {
    Predicate localPredicate = Predicates.and(paramFilteredMultimap.predicate, paramPredicate);
    return new FilteredMultimap(paramFilteredMultimap.unfiltered, localPredicate);
  }
View Full Code Here


          return Sets.removeAllImpl(this, paramCollection.iterator());
        }

        public boolean retainAll(final Collection paramCollection)
        {
          Predicate local1 = new Predicate()
          {
            public boolean apply(Map.Entry paramAnonymousEntry)
            {
              Multiset.Entry localEntry = Multisets.immutableEntry(paramAnonymousEntry.getKey(), ((Collection)paramAnonymousEntry.getValue()).size());
              return !paramCollection.contains(localEntry);
View Full Code Here

          return Sets.removeAllImpl(this, paramCollection);
        }

        public boolean retainAll(final Collection paramCollection)
        {
          Predicate local1 = new Predicate()
          {
            public boolean apply(Map.Entry paramAnonymousEntry)
            {
              return !paramCollection.contains(paramAnonymousEntry);
            }
View Full Code Here

          return false;
        }

        public boolean removeAll(final Collection paramCollection)
        {
          Predicate local1 = new Predicate()
          {
            public boolean apply(Map.Entry paramAnonymousEntry)
            {
              return paramCollection.contains(paramAnonymousEntry.getValue());
            }
View Full Code Here

          return Multimaps.FilteredMultimap.this.removeEntriesIf(local1);
        }

        public boolean retainAll(final Collection paramCollection)
        {
          Predicate local2 = new Predicate()
          {
            public boolean apply(Map.Entry paramAnonymousEntry)
            {
              return !paramCollection.contains(paramAnonymousEntry.getValue());
            }
View Full Code Here

          return Sets.removeAllImpl(this, paramCollection.iterator());
        }

        public boolean retainAll(final Collection paramCollection)
        {
          Predicate local1 = new Predicate()
          {
            public boolean apply(Map.Entry paramAnonymousEntry)
            {
              return !paramCollection.contains(paramAnonymousEntry.getKey());
            }
View Full Code Here

  public static SetView intersection(Set paramSet1, final Set paramSet2)
  {
    Preconditions.checkNotNull(paramSet1, "set1");
    Preconditions.checkNotNull(paramSet2, "set2");
    final Predicate localPredicate = Predicates.in(paramSet2);
    return new SetView(paramSet1)
    {
      public Iterator iterator()
      {
        return Iterators.filter(this.val$set1.iterator(), localPredicate);
View Full Code Here

  public static SetView difference(Set paramSet1, final Set paramSet2)
  {
    Preconditions.checkNotNull(paramSet1, "set1");
    Preconditions.checkNotNull(paramSet2, "set2");
    final Predicate localPredicate = Predicates.not(Predicates.in(paramSet2));
    return new SetView(paramSet1)
    {
      public Iterator iterator()
      {
        return Iterators.filter(this.val$set1.iterator(), localPredicate);
View Full Code Here

    if ((paramSet instanceof SortedSet))
      return filter((SortedSet)paramSet, paramPredicate);
    if ((paramSet instanceof FilteredSet))
    {
      FilteredSet localFilteredSet = (FilteredSet)paramSet;
      Predicate localPredicate = Predicates.and(localFilteredSet.predicate, paramPredicate);
      return new FilteredSet((Set)localFilteredSet.unfiltered, localPredicate);
    }
    return new FilteredSet((Set)Preconditions.checkNotNull(paramSet), (Predicate)Preconditions.checkNotNull(paramPredicate));
  }
View Full Code Here

  public static SortedSet filter(SortedSet paramSortedSet, Predicate paramPredicate)
  {
    if ((paramSortedSet instanceof FilteredSet))
    {
      FilteredSet localFilteredSet = (FilteredSet)paramSortedSet;
      Predicate localPredicate = Predicates.and(localFilteredSet.predicate, paramPredicate);
      return new FilteredSortedSet((SortedSet)localFilteredSet.unfiltered, localPredicate);
    }
    return new FilteredSortedSet((SortedSet)Preconditions.checkNotNull(paramSortedSet), (Predicate)Preconditions.checkNotNull(paramPredicate));
  }
View Full Code Here

TOP

Related Classes of com.google.common.base.Predicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.