Skip to content

Instantly share code, notes, and snippets.

@ttoommbb
Created December 26, 2014 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ttoommbb/ae0487462330198eb2ab to your computer and use it in GitHub Desktop.
Save ttoommbb/ae0487462330198eb2ab to your computer and use it in GitHub Desktop.
package com.example.zhangbog.dexcounttest;
public class AnotherTypedEvent implements ITypedEvent<AnotherTypedEvent.EventType>
{
private final EventType eventType;
static enum EventType
{
CC, DD
}
public AnotherTypedEvent(EventType eventType)
{
this.eventType = eventType;
}
@Override
public EventType getType()
{
return this.eventType;
}
@Override
public boolean isBlocking()
{
return false;
}
}
package com.example.zhangbog.dexcounttest;
public interface IEvent
{
boolean isBlocking();
}
package com.example.zhangbog.dexcounttest;
public interface ITypedEvent<T extends Enum> extends IEvent
{
T getType();
}
package com.example.zhangbog.dexcounttest;
public class SomeTypedEvent implements ITypedEvent<SomeTypedEvent.EventType>
{
private final EventType eventType;
static enum EventType{AA,BB}
public SomeTypedEvent(EventType eventType)
{
this.eventType = eventType;
}
@Override
public EventType getType()
{
return this.eventType;
}
@Override
public boolean isBlocking()
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment