package votorola.s.gwt.scene.feed; // Copyright 2011, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. /** A person as formalized in a bite feed. Not all properties are necessarily backed by * actual values, as explained in {@linkplain Bite Bite}. */ public interface Person { /** This person's dart sector as last assigned by a count. * * @return a dart sector of 1 to {@value * votorola.a.count.CountNode#DART_SECTOR_MAX}, or zero if no dart * sector is assigned, or -1 if the assignment is unknown. * * @see votorola.a.count.CountNode#dartSector() */ public byte dartSector(); /** This person's primary residence. * * @return the residence, or null if none is recorded in the bite. */ public Residence residence(); /** This person's username. * * @see votorola.a.voter.IDPair#username() * * @return the username, or null if none is recorded in the bite. */ public String username(); /** This person's vote trace according to the results of last count, exclusive of any * subsequent user input. The trace lists the person (index 0) followed by each * candidate who receives the person's vote, in order of receipt. If the length of * the trace is 1, then the vote is not received by any candidate; either because the * person is not voting or because the vote is barred. * * @return an ordered collection of Persons, the form of the collection depending * on the implementation; or null if the vote trace is unknown. An unknown * trace may be caused by an unmounted or unreported count on the vote server, * or a bug on the server side of the bite feed. * * @see votorola.a.count.CountNodeW#trace() */ public Object voteTrace(); /** An external trace projected from the voteTrace by including any subsequent input * from the user's (but not of other users); or null if the original vote trace is * unknown (null), or the user had no subsequent input. * * @return an ordered collection of Persons, the form of the collection depending * on the implementation; or null. * * @see votorola.a.count.CountNodeW#trace() */ public Object voteTraceProjected(); }