public static RankableObjectWithFields from(Tuple tuple) {
        List<Object> otherFields = Lists.newArrayList(tuple.getValues());
        Object obj = otherFields.remove(0);
        Long count = (Long) otherFields.remove(0);
        return new RankableObjectWithFields(obj, count, otherFields.toArray());
    }
public static RankableObjectWithFields from ( Tuple tuple ) { List < Object > otherFields = Lists . newArrayList ( tuple . getValues ( ) ) ; Object obj = otherFields . remove ( 0 ) ; Long count = ( Long ) otherFields . remove ( 0 ) ; return new RankableObjectWithFields ( obj , count , otherFields . toArray ( ) ) ; }
Construct a new instance based on the provided {@link Tuple}.
<p/>
This method expects the object to be ranked in the first field (index 0)
of the provided tuple, and the number of occurrences of the object (its
count) in the second field (index 1). Any further fields in the tuple
will be extracted and tracked, too. These fields can be accessed via
{@link RankableObjectWithFields#getFields()}.

@param tuple

@return new instance based on the provided tuple