Skip to content

Commit

Permalink
Add @OverRide annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
motlin committed May 6, 2016
1 parent 91d74b3 commit b9dfbc2
Show file tree
Hide file tree
Showing 711 changed files with 10,331 additions and 384 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down Expand Up @@ -40,34 +40,43 @@ public interface LazyIterable<T>
/**
* @inheritDoc
*/
@Override
T getFirst();

/**
* Creates a deferred iterable for selecting elements from the current iterable.
*/
@Override
LazyIterable<T> select(Predicate<? super T> predicate);

@Override
<P> LazyIterable<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
<S> LazyIterable<S> selectInstancesOf(Class<S> clazz);

/**
* Creates a deferred iterable for rejecting elements from the current iterable.
*/
@Override
LazyIterable<T> reject(Predicate<? super T> predicate);

@Override
<P> LazyIterable<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter);

/**
* Creates a deferred iterable for collecting elements from the current iterable.
*/
@Override
<V> LazyIterable<V> collect(Function<? super T, ? extends V> function);

@Override
<P, V> LazyIterable<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter);

/**
* Creates a deferred iterable for selecting and collecting elements from the current iterable.
*/
@Override
<V> LazyIterable<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function);

/**
Expand Down Expand Up @@ -102,6 +111,7 @@ public interface LazyIterable<T>
/**
* Creates a deferred flattening iterable for the current iterable.
*/
@Override
<V> LazyIterable<V> flatCollect(Function<? super T, ? extends Iterable<V>> function);

/**
Expand All @@ -112,65 +122,78 @@ public interface LazyIterable<T>
/**
* Creates a deferred zip iterable.
*/
@Override
<S> LazyIterable<Pair<T, S>> zip(Iterable<S> that);

/**
* Creates a deferred zipWithIndex iterable.
*/
@Override
LazyIterable<Pair<T, Integer>> zipWithIndex();

/**
* Creates a deferred chunking iterable.
*/
@Override
LazyIterable<RichIterable<T>> chunk(int size);

/**
* Creates a deferred tap iterable.
*/
@Override
LazyIterable<T> tap(Procedure<? super T> procedure);

/**
* Iterates over this iterable adding all elements into the target collection.
*/
@Override
<R extends Collection<T>> R into(R target);

/**
* Returns a lazy BooleanIterable which will transform the underlying iterable data to boolean values based on the booleanFunction.
*/
@Override
LazyBooleanIterable collectBoolean(BooleanFunction<? super T> booleanFunction);

/**
* Returns a lazy ByteIterable which will transform the underlying iterable data to byte values based on the byteFunction.
*/
@Override
LazyByteIterable collectByte(ByteFunction<? super T> byteFunction);

/**
* Returns a lazy CharIterable which will transform the underlying iterable data to char values based on the charFunction.
*/
@Override
LazyCharIterable collectChar(CharFunction<? super T> charFunction);

/**
* Returns a lazy DoubleIterable which will transform the underlying iterable data to double values based on the doubleFunction.
*/
@Override
LazyDoubleIterable collectDouble(DoubleFunction<? super T> doubleFunction);

/**
* Returns a lazy FloatIterable which will transform the underlying iterable data to float values based on the floatFunction.
*/
@Override
LazyFloatIterable collectFloat(FloatFunction<? super T> floatFunction);

/**
* Returns a lazy IntIterable which will transform the underlying iterable data to int values based on the intFunction.
*/
@Override
LazyIntIterable collectInt(IntFunction<? super T> intFunction);

/**
* Returns a lazy LongIterable which will transform the underlying iterable data to long values based on the longFunction.
*/
@Override
LazyLongIterable collectLong(LongFunction<? super T> longFunction);

/**
* Returns a lazy ShortIterable which will transform the underlying iterable data to short values based on the shortFunction.
*/
@Override
LazyShortIterable collectShort(ShortFunction<? super T> shortFunction);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down Expand Up @@ -46,6 +46,7 @@ public interface PrimitiveIterable
*
* @return a string representation of this PrimitiveIterable
*/
@Override
String toString();

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down Expand Up @@ -54,26 +54,37 @@ public interface Bag<T>
@Override
int hashCode();

@Override
Bag<T> tap(Procedure<? super T> procedure);

@Override
Bag<T> select(Predicate<? super T> predicate);

@Override
<P> Bag<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
Bag<T> reject(Predicate<? super T> predicate);

@Override
<P> Bag<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
PartitionBag<T> partition(Predicate<? super T> predicate);

@Override
<P> PartitionBag<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
<S> Bag<S> selectInstancesOf(Class<S> clazz);

@Override
<V> BagMultimap<V, T> groupBy(Function<? super T, ? extends V> function);

@Override
<V> BagMultimap<V, T> groupByEach(Function<? super T, ? extends Iterable<V>> function);

@Override
SetIterable<Pair<T, Integer>> zipWithIndex();

/**
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand Down Expand Up @@ -45,79 +45,110 @@
*/
public interface ImmutableBag<T> extends UnsortedBag<T>, ImmutableBagIterable<T>
{
@Override
ImmutableBag<T> newWith(T element);

@Override
ImmutableBag<T> newWithout(T element);

@Override
ImmutableBag<T> newWithAll(Iterable<? extends T> elements);

@Override
ImmutableBag<T> newWithoutAll(Iterable<? extends T> elements);

@Override
ImmutableBag<T> selectByOccurrences(IntPredicate predicate);

@Override
ImmutableBag<T> tap(Procedure<? super T> procedure);

@Override
ImmutableBag<T> select(Predicate<? super T> predicate);

@Override
<P> ImmutableBag<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
ImmutableBag<T> reject(Predicate<? super T> predicate);

@Override
<P> ImmutableBag<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
PartitionImmutableBag<T> partition(Predicate<? super T> predicate);

@Override
<P> PartitionImmutableBag<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
<S> ImmutableBag<S> selectInstancesOf(Class<S> clazz);

@Override
<V> ImmutableBag<V> collect(Function<? super T, ? extends V> function);

@Override
ImmutableBooleanBag collectBoolean(BooleanFunction<? super T> booleanFunction);

@Override
ImmutableByteBag collectByte(ByteFunction<? super T> byteFunction);

@Override
ImmutableCharBag collectChar(CharFunction<? super T> charFunction);

@Override
ImmutableDoubleBag collectDouble(DoubleFunction<? super T> doubleFunction);

@Override
ImmutableFloatBag collectFloat(FloatFunction<? super T> floatFunction);

@Override
ImmutableIntBag collectInt(IntFunction<? super T> intFunction);

@Override
ImmutableLongBag collectLong(LongFunction<? super T> longFunction);

@Override
ImmutableShortBag collectShort(ShortFunction<? super T> shortFunction);

@Override
<P, V> ImmutableBag<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter);

@Override
<V> ImmutableBag<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function);

@Override
<V> ImmutableBag<V> flatCollect(Function<? super T, ? extends Iterable<V>> function);

@Override
<V> ImmutableBagMultimap<V, T> groupBy(Function<? super T, ? extends V> function);

@Override
<V> ImmutableBagMultimap<V, T> groupByEach(Function<? super T, ? extends Iterable<V>> function);

/**
* @deprecated in 6.0. Use {@link OrderedIterable#zip(Iterable)} instead.
*/
@Override
@Deprecated
<S> ImmutableBag<Pair<T, S>> zip(Iterable<S> that);

/**
* @deprecated in 6.0. Use {@link OrderedIterable#zipWithIndex()} instead.
*/
@Override
@Deprecated
ImmutableSet<Pair<T, Integer>> zipWithIndex();

/**
* @since 6.0
*/
@Override
ImmutableList<ObjectIntPair<T>> topOccurrences(int count);

/**
* @since 6.0
*/
@Override
ImmutableList<ObjectIntPair<T>> bottomOccurrences(int count);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015 Goldman Sachs.
* Copyright (c) 2016 Goldman Sachs.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompany this distribution.
Expand All @@ -24,29 +24,42 @@

public interface ImmutableBagIterable<T> extends Bag<T>, ImmutableCollection<T>
{
@Override
ImmutableBagIterable<T> tap(Procedure<? super T> procedure);

@Override
ImmutableBagIterable<T> select(Predicate<? super T> predicate);

@Override
<P> ImmutableBagIterable<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
ImmutableBagIterable<T> reject(Predicate<? super T> predicate);

@Override
<P> ImmutableBagIterable<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
PartitionImmutableBagIterable<T> partition(Predicate<? super T> predicate);

@Override
<P> PartitionImmutableBagIterable<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter);

@Override
<S> ImmutableBagIterable<S> selectInstancesOf(Class<S> clazz);

@Override
<V> ImmutableBagIterableMultimap<V, T> groupBy(Function<? super T, ? extends V> function);

@Override
<V> ImmutableBagIterableMultimap<V, T> groupByEach(Function<? super T, ? extends Iterable<V>> function);

@Override
ImmutableSetIterable<Pair<T, Integer>> zipWithIndex();

@Override
ImmutableBagIterable<T> selectByOccurrences(IntPredicate predicate);

@Override
MutableMapIterable<T, Integer> toMapOfItemToCount();
}

0 comments on commit b9dfbc2

Please sign in to comment.