static TypeDesc intern(TypeDesc type) { return cInstances.put(type); }
static MethodDesc intern(MethodDesc desc) { return cInstances.put(desc); }
private Object readResolve() { return cCanonical.put(this); } }
private Object readResolve() { return cCanonical.put(this); } }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if either filter is null */ @SuppressWarnings("unchecked") static <S extends Storable> AndFilter<S> getCanonical(Filter<S> left, Filter<S> right) { return (AndFilter<S>) cCanonical.put(new AndFilter<S>(left, right)); }
/** * Returns a canonical instance, creating a new one if there isn't one * already in the cache. */ @SuppressWarnings("unchecked") private static <S extends Storable> ExistsFilter<S> getCanonical(ChainedProperty<S> property, Filter<?> subFilter, boolean not) { return (ExistsFilter<S>) cCanonical.put(new ExistsFilter<S>(property, subFilter, not)); }
/** * Returns a canonical instance which has no chain. * * @throws IllegalArgumentException if prime is null */ @SuppressWarnings("unchecked") public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime) { return (ChainedProperty<S>) cCanonical.put(new ChainedProperty<S>(prime, null, null)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if property is null */ @SuppressWarnings("unchecked") public static <S extends Storable> OrderedProperty<S> get(ChainedProperty<S> property, Direction direction) { return (OrderedProperty<S>) cCanonical.put(new OrderedProperty<S>(property, direction)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if either filter is null */ @SuppressWarnings("unchecked") static <S extends Storable> OrFilter<S> getCanonical(Filter<S> left, Filter<S> right) { return (OrFilter<S>) cCanonical.put(new OrFilter<S>(left, right)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if property is null */ @SuppressWarnings("unchecked") public static <S extends Storable> OrderedProperty<S> get(ChainedProperty<S> property, Direction direction) { return (OrderedProperty<S>) cCanonical.put(new OrderedProperty<S>(property, direction)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if either filter is null */ @SuppressWarnings("unchecked") static <S extends Storable> OrFilter<S> getCanonical(Filter<S> left, Filter<S> right) { return (OrFilter<S>) cCanonical.put(new OrFilter<S>(left, right)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if prime is null or if chained * properties are not formed properly */ @SuppressWarnings("unchecked") public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime, StorableProperty<?>... chain) { return (ChainedProperty<S>) cCanonical.put(new ChainedProperty<S>(prime, chain, null)); }
@SuppressWarnings("unchecked") static <S extends Storable> OpenFilter<S> getCanonical(Class<S> type) { return (OpenFilter<S>) cCanonical.put(new OpenFilter<S>(type)); }
/** * Returns a canonical instance, creating a new one if there isn't one * already in the cache. */ @SuppressWarnings("unchecked") private static <S extends Storable> ExistsFilter<S> getCanonical(ChainedProperty<S> property, Filter<?> subFilter, boolean not) { return (ExistsFilter<S>) cCanonical.put(new ExistsFilter<S>(property, subFilter, not)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if prime is null or if chained * properties are not formed properly */ @SuppressWarnings("unchecked") public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime, StorableProperty<?>... chain) { return (ChainedProperty<S>) cCanonical.put(new ChainedProperty<S>(prime, chain, null)); }
/** * Returns a canonical instance. * * @throws IllegalArgumentException if either filter is null */ @SuppressWarnings("unchecked") static <S extends Storable> AndFilter<S> getCanonical(Filter<S> left, Filter<S> right) { return (AndFilter<S>) cCanonical.put(new AndFilter<S>(left, right)); }
/** * Returns a canonical instance which has no chain. * * @throws IllegalArgumentException if prime is null */ @SuppressWarnings("unchecked") public static <S extends Storable> ChainedProperty<S> get(StorableProperty<S> prime) { return (ChainedProperty<S>) cCanonical.put(new ChainedProperty<S>(prime, null, null)); }
@SuppressWarnings("unchecked") static <S extends Storable> ClosedFilter<S> getCanonical(Class<S> type) { return (ClosedFilter<S>) cCanonical.put(new ClosedFilter<S>(type)); }
@SuppressWarnings("unchecked") static <S extends Storable> ClosedFilter<S> getCanonical(Class<S> type) { return (ClosedFilter<S>) cCanonical.put(new ClosedFilter<S>(type)); }
/** * Returns a canonical instance, creating a new one if there isn't one * already in the cache. * * @throws IllegalArgumentException if property or operator is null */ @SuppressWarnings("unchecked") static <S extends Storable> PropertyFilter<S> getCanonical(ChainedProperty<S> property, RelOp op, Object constant) { return (PropertyFilter<S>) cCanonical .put(new PropertyFilter<S>(property, op, BOUND_CONSTANT, constant)); }