Ignore:
Timestamp:
06/26/13 13:27:31 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • use java annotations to mark classes and fields to be used when:
    • using java classes with ReflectionAccess? to represent remote objects with FramsClass? description found by "info ..." requests
    • to build up FramsClass? representation of objects not present at remote server
  • allow using primitive types (instead of wraping counterparts) in reflected classes
  • rework FramsClass? creation process (add FramsClassBuilder?)
  • add more tests

CHANGELOG:
Prepare model.World class.

Minor change.

Use primitive types for Genotype and Creature classes.

Use primitive types in model.Neuro* classes.

Use primitive types in model.Joint* classes.

Use primitive types in model.Part* classes.

Fix primitive values.

Extract FramsClassBuilder?.

Add tests of Model classes.

More fixes.

Refactorize out ParamCandidate?.

Several fixes.

Fix all regressions after introducing annotations.

Use annotations throughout the project.

Add exception classes.

Improve creation of FramsClass?.

More changes.

Many changes regarding annotations.

Annotate classes in com.framsticks.model package.

Remove manual FramsClass? constructor.

Construct FramsClass? for Creature. Add test.

Add default values to the ParamAnnotation?.

Add ParamBuilderTest? and ParamAnnotation?.

Add FramsClassAnnotation?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/util/lang/Containers.java

    r84 r86  
    44import java.util.Iterator;
    55import java.util.List;
     6
    67import org.apache.commons.collections.functors.InstanceofPredicate;
     8import org.apache.commons.collections.functors.NotPredicate;
    79import org.apache.commons.collections.iterators.FilterIterator;
    810
     
    2022        }
    2123
    22         @SuppressWarnings("unchecked")
    2324        public static <T> Iterable<T> filterInstanceof(Iterator<? super T> i, Class<T> type) {
    2425                return new IterableIterator<T>(new FilterIterator(i, new InstanceofPredicate(type)));
    2526        }
    2627
    27         @SuppressWarnings("unchecked")
    2828        public static <T> Iterable<T> filterInstanceof(Iterable<? super T> i, Class<T> type) {
    2929                return new IterableIterator<T>(new FilterIterator(i.iterator(), new InstanceofPredicate(type)));
    3030        }
    3131
    32         @SuppressWarnings("unchecked")
    3332        public static <T> Iterable<T> filterInstanceof(Collection<? super T> c, Class<T> type) {
    3433                return new IterableIterator<T>(new FilterIterator(c.iterator(), new InstanceofPredicate(type)));
    3534        }
    3635
    37         // @SuppressWarnings("unchecked")
    38         // public static <T> Iterable<T> filterNotInstanceof(Collection<T> c, Class<? extends T> type) {
    39         //      return new IterableIterator<T>(new FilterIterator(c.iterator(), new NotPredicate(new InstanceofPredicate(type))));
    40         // }
     36        public static <T> Iterable<T> filterNotInstanceof(Collection<T> c, Class<? extends T> type) {
     37                return new IterableIterator<T>(new FilterIterator(c.iterator(), new NotPredicate(new InstanceofPredicate(type))));
     38        }
    4139}
Note: See TracChangeset for help on using the changeset viewer.